-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Include compiler version in build hash #1430
Closed
Closed
Changes from all commits
Commits
Show all changes
3 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
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
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
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
12 changes: 12 additions & 0 deletions
12
testsuite/fixtures/build_hash_index/gn/gnat_external/gnat_external-external.toml
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
description = "GNAT is a compiler for the Ada programming language" | ||
name = "gnat_external" | ||
|
||
maintainers = ["[email protected]"] | ||
maintainers-logins = ["mosteo"] | ||
|
||
[[external]] | ||
kind = "version-output" | ||
# We look for make instead that should be always installed. | ||
version-command = ["make", "--version"] | ||
version-regexp = ".*Make ([\\d\\.]+).*" | ||
provides = "gnat" |
11 changes: 11 additions & 0 deletions
11
testsuite/fixtures/build_hash_index/gn/gnat_native/gnat_native-7777.0.0.toml
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
description = "Fake GNAT native crate" | ||
name = "gnat_native" | ||
version = "7777.0.0" | ||
maintainers = ["[email protected]"] | ||
maintainers-logins = ["mylogin"] | ||
provides = ["gnat=7777.0"] | ||
|
||
# Test dynamic expression, but for all OSes | ||
[origin."case(os)"."..."] | ||
url = "file:../../../crates/libhello_1.0.0.tgz" | ||
hashes = ["sha512:99fa3a55540d0655c87605b54af732f76a8a363015f183b06e98aa91e54c0e69397872718c5c16f436dd6de0fba506dc50c66d34a0e5c61fb63cb01fa22f35ac"] |
15 changes: 15 additions & 0 deletions
15
testsuite/fixtures/build_hash_index/gn/gnat_native/gnat_native-8888.0.0.toml
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
description = "Fake GNAT native crate" | ||
name = "gnat_native" | ||
version = "8888.0.0" | ||
maintainers = ["[email protected]"] | ||
maintainers-logins = ["mylogin"] | ||
provides = ["gnat=8888.0"] | ||
|
||
# Although the compiler is fake, we use this path in some tests | ||
environment.'case(os)'.'windows'.TEST_PATH.append = '${CRATE_ROOT}\bin' | ||
environment.'case(os)'.'...'.TEST_PATH.append = '${CRATE_ROOT}/bin' | ||
|
||
# Test dynamic expression, but for all OSes | ||
[origin."case(os)"."..."] | ||
url = "file:../../../crates/libhello_1.0.0.tgz" | ||
hashes = ["sha512:99fa3a55540d0655c87605b54af732f76a8a363015f183b06e98aa91e54c0e69397872718c5c16f436dd6de0fba506dc50c66d34a0e5c61fb63cb01fa22f35ac"] |
16 changes: 16 additions & 0 deletions
16
testsuite/fixtures/build_hash_index/he/hello/hello-1.0.0.toml
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
description = "\"Hello, world!\" demonstration project" | ||
long-description = "This is an example of long description in a multi-line string.\n\nMarkdown formating `can` be used to have \"nice\" display on the website.\n" | ||
name = "hello" | ||
version = "1.0.0" | ||
website = "example.com" | ||
authors = ["Bob", "Alice"] | ||
licenses = "GPL-3.0-only OR MIT" | ||
maintainers = ["[email protected]", "[email protected]"] | ||
maintainers-logins = ["mylogin"] | ||
tags = ["tag1", "other-tag"] | ||
|
||
[[depends-on]] | ||
libhello = "^1.0" | ||
|
||
[origin] | ||
url = "file:../../../crates/hello_1.0.0" |
29 changes: 29 additions & 0 deletions
29
testsuite/fixtures/build_hash_index/he/hello/hello-1.0.1.toml
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
description = "\"Hello, world!\" demonstration project" | ||
long-description = "This is an example of long description in a multi-line string.\n\nMarkdown formating `can` be used to have \"nice\" display on the website.\n" | ||
name = "hello" | ||
version = "1.0.1" | ||
website = "example.com" | ||
authors = ["Bob", "Alice"] | ||
licenses = "GPL-3.0-only OR MIT" | ||
maintainers = ["[email protected]", "[email protected]"] | ||
maintainers-logins = ["mylogin"] | ||
tags = ["tag1", "other-tag"] | ||
|
||
[[depends-on]] | ||
libhello = "^1.0" | ||
|
||
[configuration.variables] | ||
Var1={type="Boolean"} | ||
Var2={type="String", default="str"} | ||
Var3={type="Enum", values=["A", "B"], default="A"} | ||
Var4={type="Integer", default=0} | ||
Var5={type="Integer", first=-1, last=1, default=0} | ||
Var7={type="Real", default=0.0} | ||
Var6={type="Real", first=-1.0, last=1.0, default=0.0} | ||
|
||
[configuration.values] | ||
hello.Var1=true # So far it is possible for a crate to set its own var | ||
libhello.Var1=false | ||
|
||
[origin] | ||
url = "file:../../../crates/hello_1.0.1" |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
version = "1.1" |
23 changes: 23 additions & 0 deletions
23
testsuite/fixtures/build_hash_index/li/libhello/libhello-1.0.0.toml
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
description = "\"Hello, world!\" demonstration project support library" | ||
name = "libhello" | ||
version = "1.0.0" | ||
maintainers = ["[email protected]"] | ||
maintainers-logins = ["mylogin"] | ||
tags = ["libhello-tag1"] | ||
|
||
[configuration.variables] | ||
Var1={type="Boolean", default=true} | ||
|
||
[gpr-externals] | ||
TEST_GPR_EXTERNAL = ["gpr_ext_A", "gpr_ext_B", "gpr_ext_C"] | ||
TEST_FREEFORM_UNSET = "" # to test build hashing with an unset var | ||
|
||
[gpr-set-externals] | ||
TEST_GPR_EXTERNAL = "gpr_ext_B" | ||
TEST_UNDECLARED = "used_by_another_crate" | ||
|
||
[environment] | ||
TEST_ENV.set = "myenv" | ||
|
||
[origin] | ||
url = "file:../../../crates/libhello_1.0.0" |
8 changes: 8 additions & 0 deletions
8
testsuite/fixtures/build_hash_index/ma/make/make-external.toml
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
description = "Utility for directing compilation" | ||
name = "make" | ||
maintainers = ["[email protected]"] | ||
maintainers-logins = ["mylogin"] | ||
|
||
[[external]] | ||
kind = "system" | ||
origin = [] # Empty on purpose to ensure unavailable in tests |
Oops, something went wrong.
Oops, something went wrong.
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.
The compiler is able to detect incompatible build artifact, but it's probably better to avoid the error message.
Also note that this will not handle all case for cross-target since a given cross compiler can support multiple instruction sets. For instance
arm-elf
can do Arm Cortex-M0, Cortex-M7, etc.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.
Right; for those I understood that we're not going to do anything directly, but that the project file will separate the objects into folders?
I guess at some point we can use
libgpr
to extract the necessary info from the project file?