Repository navigation
fix(cargo-oxide): take the scaffold's host crates from cuda-host's git source - #1488
Open
alejandro-soto-franco wants to merge 1 commit into
Open
alejandro-soto-franco wants to merge 1 commit into
alejandro-soto-franco wants to merge 1 commit into
Conversation
…t source `cargo oxide new` named cuda-core (and, with --async, cuda-async) from crates.io at 0.4.0 next to a git cuda-host. cuda-host depends on those crates by path at tip of tree. The lockfile therefore carried two cuda-core packages and the expansion of #[cuda_module] failed to type-check: 7 errors in the sync template, 13 in the async one, all CudaContext/CudaModule mismatches. The templates now take cuda-core and cuda-async from GIT_REPO, the source cuda-host already comes from, and SHARED_HOST_CRATES_VERSION goes away. check-shared-crate-pin.sh section 3 now requires every host-crate line in the templates to use GIT_REPO and rejects a crates.io requirement there. A new test asserts the same invariant over both templates. Signed-off-by: Alejandro Soto Franco <sotofranco.eng@gmail.com>
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A project from
cargo oxide newdoes not compile on main. The template takescuda-deviceandcuda-hostfrom git, thencuda-core = "0.4.0"(and with--async,cuda-async = "0.4.0") from crates.io. Since #1466,cuda-hostdepends oncuda-coreby path at tip of tree. The git checkout supplies its owncuda-coreand the lockfile has two:The
#[cuda_module]expansion then fails to type-check: 7 errors in the sync template and 13 in the async one, all of this form:check-shared-crate-pin.shalready names this failure for the example workspaces ("a crates.io copy there would resolve a second cuda_core and break type unification with path cuda-host"), and its section 3 required the scaffold to keep the crates.io pin.cuda-coreandcuda-asyncfromGIT_REPO, the sourcecuda-hostcomes from.SHARED_HOST_CRATES_VERSIONgoes away.check-shared-crate-pin.shsection 3 requires every host-crate line in the templates to useGIT_REPO. Reintroducingcuda-core = "0.4.0"fails it.scaffold_takes_every_cuda_crate_from_one_git_sourceasserts everycuda-*line in both templates names the same git source ascuda-device.This touches the scaffold constant that #1466 planned to derive from the root manifests under #1459. Taking the host crates from git removes the constant and with it the scaffold's need for that step.
Test:
cargo test -p cargo-oxide(244 passed), clippy-D warnings,check-shared-crate-pin.shpasses and rejects the old pin.cargo oxide newthencargo oxide run, for both the sync and--asynctemplates, on an RTX 5060 Laptop (sm_120, CUDA 13.3):PASSED: all 1024 elements correct, onecuda-corein each lockfile.