-
-
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
Better documentation for binary origins #1546
Merged
Merged
Changes from all commits
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
Binary file added
BIN
+435 Bytes
testsuite/tests/index/origin-binary-explicit/my_index/crates/libhello_1.0.0.tgz
Binary file not shown.
11 changes: 11 additions & 0 deletions
11
...e/tests/index/origin-binary-explicit/my_index/index/he/hello_world/hello_world-0.1.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 = "\"Hello, world!\" demonstration project" | ||
name = "hello_world" | ||
version = "0.1.0" | ||
licenses = "GPL-3.0-only" | ||
maintainers = ["[email protected]"] | ||
maintainers-logins = ["mylogin"] | ||
|
||
[origin] | ||
url = "../../../crates/libhello_1.0.0.tgz" | ||
hashes = ["sha256:c17d6ce87c6997c5f68ea4bfe6134c318073fed38ec0f81ccb1ae2bfdcc0187a"] | ||
binary = true |
1 change: 1 addition & 0 deletions
1
testsuite/tests/index/origin-binary-explicit/my_index/index/index.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 @@ | ||
version = "1.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,37 @@ | ||
""" | ||
Test that origins explicitly marked as binary are interpreted as such, even if | ||
they do not use a dynamic expression. | ||
""" | ||
|
||
from glob import glob | ||
import os | ||
from drivers import builds | ||
from drivers.alr import alr_config_dir, alr_with, run_alr, init_local_crate | ||
from drivers.asserts import assert_match | ||
from drivers.helpers import contents | ||
|
||
# Check basic loading | ||
p = run_alr('show', 'hello_world') | ||
assert "Origin: binary archive" in p.out, \ | ||
"Unexpected output: " + p.out | ||
|
||
init_local_crate() | ||
alr_with("hello_world") | ||
run_alr("build") | ||
|
||
# Check deployment location | ||
if builds.are_shared(): | ||
# Build dir of a binary crate should not exist, as it is used directly from | ||
# its download location | ||
assert len(glob(f"{builds.path()}/hello_world*")) ==0 , \ | ||
"Unexpected build dir: " + str(contents(builds.path())) | ||
else: | ||
# Config should not have been generated for a binary crate during build | ||
assert os.path.exists(os.path.join("alire", "cache", "dependencies", | ||
"hello_world_0.1.0_c17d6ce8")) | ||
assert not os.path.exists(os.path.join("alire", "cache", "dependencies", | ||
"hello_world_0.1.0_c17d6ce8", | ||
"config")), \ | ||
"Unexpected config dir: " + str(contents("alire")) | ||
|
||
print('SUCCESS') |
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,5 @@ | ||
driver: python-script | ||
build_mode: both | ||
indexes: | ||
my_index: | ||
in_fixtures: false |
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.
Maybe we can disable implicit detection then?
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 will require editing all binary releases in the index. We are due for an index version bump with the 2.0 release, so that would be a good moment.
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.
It would make things more clear for everyone I think.