-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: improve compiler detection #5740
Conversation
f655546
to
19e9511
Compare
ready for the review, I have tested all configurations mentioned above |
I'm a bit surprised that using the g++ for fixing the detection requires a new class of more than 200 lines and several changes among 6 files. |
Any news on this? |
@sergeyklay for me this PR is not valid for closing the issue. @SSE4 if you want to move this forward open a PR with a simpler fix and later we can discuss if we want to introduce other improvements and why. |
19e9511
to
6d86974
Compare
rebased, review comments addressed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR increases our test suite time by 50% in Linux, around 20% in others, depending on the run.
I am sorry, but this is not possible. Relying on building such a small app for auto-detecting compilers should probably not be the way.
Detecting the compiler versions was not a big issue so far (for the current model). We need to think if we want to follow this approach. In case we wanted, then probably:
- Use it only for some extreme cases, when it is absolutely necessary
- Make sure there is a fast and easy alternative for testing
So we need time to discuss this.
interesting, I'll take a look at why does it slow down so much. tests I've added are mocked and shouldn't cause actual compiler commands to be run. so I am puzzled right now. |
It is interesting, but I saw some differences in the CI previous job, I have relaunched in https://conan-ci.jfrog.info/blue/organizations/jenkins/ConanTestSuite/detail/PR-5740/5/pipeline/180, and still see consistently slower builds than other PR. Could be a pure CI issue, sure, but I am curious to understand why the big difference (compare for example with recent PR build: https://conan-ci.jfrog.info/blue/organizations/jenkins/ConanTestSuite/detail/PR-7284/4/pipeline/179) |
@memsharded build you have referenced is definitely slower for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, if time is a concern for the test suite, let's fix it in the test suite, not in the codebase. We cannot add legacy or complexity to the codebase because of the tests. Caches are not easy to manage, I'm afraid the environment could change and the detection should run again to detect a different compiler. Can it be an issue?
If we are trying to stabilize the conan_api
and document it, then we need to think about Conan being a library, the environment will change and cache won't be cleaned
If we agree with the implemented functionality (I think it is a huge improvement), then we can figure out how to minimize this extra time in the tests...
e7acdec
to
35061b8
Compare
Signed-off-by: SSE4 <tomskside@gmail.com>
@jgsogo rebased, added CONAN_V2_MODE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the v2_mode there can be no risk if want to add this feature... but we need to think how can we test this feature if this becomes the default in conan v2
Q: why parsing
|
QCC = "qcc" | ||
|
||
|
||
class CompilerId(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could easily be a namedtuple, but it is ok, no need to change it now
We had some concerns about testing, any idea/plan about how to test this new detection logic if it becomes the 2.0 default? |
I guess this is something to consider for the Conan CI itself, like having different images with environments to test compilers, build helpers, tools... |
Changelog: Feature: improve compiler detection for
CONAN_V2_MODE
.Docs: conan-io/docs#1789
closes: #4322
things to test:
brew install llvm
)brew install gcc
)what else?
develop
branch, documenting this one.Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.