-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require explicit
binary=true
for all binary origins (#1598)
* Package to track future features * Loading metadata and explicit binary
- Loading branch information
Showing
16 changed files
with
201 additions
and
37 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
with Semantic_Versioning; | ||
|
||
package Alire.Index_Features is | ||
|
||
-- For easier lockstep updates, we keep track of features that we will | ||
-- enable in future index versions. | ||
|
||
subtype Min_Version is Semantic_Versioning.Version; | ||
|
||
use type Min_Version; | ||
|
||
Explicit_Binary_Origin : constant Min_Version := +"1.3.0"; | ||
-- Require that binary origins are explicitly marked as such instead of | ||
-- relying on dynamic expressions. | ||
|
||
end Alire.Index_Features; |
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,25 @@ | ||
with Semantic_Versioning; | ||
|
||
package Alire.Loading with Preelaborate is | ||
|
||
-- Auxiliary type to pass info around while loading things from disk | ||
-- (currently only indexes...) | ||
|
||
type Kinds is (None, Index); | ||
|
||
type Metadata (Kind : Kinds := None) is record | ||
case Kind is | ||
when Index => | ||
Version : Semantic_Versioning.Version; | ||
when None => | ||
null; | ||
end case; | ||
end record; | ||
|
||
function For_Index (Version : Semantic_Versioning.Version) | ||
return Metadata | ||
is (Kind => Index, Version => Version); | ||
|
||
function No_Metadata return Metadata is (Kind => None); | ||
|
||
end Alire.Loading; |
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
Binary file added
BIN
+435 Bytes
testsuite/tests/index/origin-dynamic-binary-explicit/my_index/crates/libhello_1.0.0.tgz
Binary file not shown.
Oops, something went wrong.