Skip to content
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

Change PkgOpt::validate to use intersects #498

Merged
merged 2 commits into from
Sep 9, 2022
Merged

Change PkgOpt::validate to use intersects #498

merged 2 commits into from
Sep 9, 2022

Conversation

jrray
Copy link
Collaborator

@jrray jrray commented Sep 3, 2022

This setup is expected to solve, but the use of contains vs intersects
prevents finding a solution that uses spi-platform/2022.4.1.4 when
package openimageio requires spi-platform/~2022.4.1.3.

Related to #492.

Signed-off-by: J Robert Ray jrray@jrray.org

Multiple deps were being added to the solution under the same request, so
they would overwrite one another.

Signed-off-by: J Robert Ray <jrray@jrray.org>
@jrray jrray self-assigned this Sep 3, 2022
@@ -116,7 +116,7 @@ macro_rules! make_build_and_components {
let dep = Arc::new($dep.clone());
solution.add(
&$crate::PkgRequest::from_ident(
recipe.to_ident(),
$dep.to_ident(),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended up not needing to pass multiple deps to make_build! but this is a bug I ran into.

Add test to demonstrate how `contains` prevents a setup from solving with
`spi-platform/2022.4.1.4` when package `openimage` requires
`spi-platform/~2022.4.1.3`.

Related to #492.

Signed-off-by: J Robert Ray <jrray@jrray.org>
@jrray jrray changed the title Add test case to demonstrate contains issue Change PkgOpt::validate to use intersects Sep 3, 2022
@codecov
Copy link

codecov bot commented Sep 3, 2022

Codecov Report

Merging #498 (83f9abf) into master (ce9f98b) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #498      +/-   ##
==========================================
+ Coverage   67.10%   67.14%   +0.03%     
==========================================
  Files         274      274              
  Lines       18604    18620      +16     
==========================================
+ Hits        12485    12502      +17     
+ Misses       6119     6118       -1     
Impacted Files Coverage Δ
crates/spk-solve/src/macros.rs 100.00% <ø> (ø)
crates/spk-schema/src/option.rs 63.36% <100.00%> (ø)
crates/spk-solve/src/solver_test.rs 99.24% <100.00%> (+0.01%) ⬆️
crates/spfs-cli/main/src/cmd_untag.rs 0.00% <0.00%> (ø)
crates/spk-cli/cmd-test/src/test/tester.rs 61.11% <0.00%> (ø)
crates/spk-build/src/build/binary.rs 79.04% <0.00%> (+0.06%) ⬆️
crates/spfs/src/bootstrap.rs 51.30% <0.00%> (+1.30%) ⬆️
crates/spk-schema/src/spec.rs 67.76% <0.00%> (+1.31%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jrray jrray requested a review from rydrman September 3, 2022 21:24
@jrray jrray merged commit e7d9df5 into master Sep 9, 2022
@jrray jrray deleted the jrray/issue492 branch September 9, 2022 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants