-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Replace version_check with our own parser to generate better errors #26
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,4 @@ members = ["test_suite"] | |
[lib] | ||
proc-macro = true | ||
|
||
[build-dependencies] | ||
version_check = "0.9.2" | ||
|
||
[dependencies] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 parses the "release: " line of the verbose version output.
This line doesn't contain extra info like the commit date, so it may be a bit more robust than the previous way.
(I suspect that the cause of #24 may be that rustc installed by yum added its own information to the output of
rustc --version
. So, this may solve #24 completely)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.
@taiki-e Okay. I will merge those to local project, and test out. I have come back to the situation, I mean install rustc and cargo version 1.45.2 by yum not by rustup.
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.
@taiki-e Yes. after coming back to the incorrect situation, where install rustc and cargo version 1.45.2 by yum NOT rustup. I build the older version (0.4.1)of taiki-e/const_fn, the errors came out again. That means we reduplicate that case. Then download the latest version (0.4.2) of taiki-e/const_fn, and build it and success. Then move on to build time-rs/time with updating taiki-e/const_fn the latest version (0.4.2). It success. As I check the updated source code, it like remove the dependence version_check v0.9.2 by having your code inside version check in the file build.rs. One more thing I noticed that the other crate in time-rs/time v0.2.16 has the dependence version_check v0.9.2 as I saw the downloading version_check v0.9.2 and compiling, but there is no compile issue with the case(installing rustc and cargo version 1.45.2 by yum NOT rustup).
Anyway. Thanks for your help
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.
@APIPLM Thanks for confirming it. Anyway, I believe #24 is completely resolved so I'll close that.
Even if
time
depends onversion_check
, it doesn't fail to compile due to the same problem, because the build script is written so that compile will continue even ifversion_check
fails to determine version. AFAIK, this is a common design used by most crates.The reason const-fn is designed to make this fail is that it is likely a bug in version parser or this crate itself. (
rustversion
is also designed to stop compilation as well)