-
Couldn't load subscription status.
- Fork 367
feat(build): git source #4446
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
base: main
Are you sure you want to change the base?
feat(build): git source #4446
Conversation
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 looks great! Want to make a companion PR to pixi-build-testsuite?
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.
I think we also need to add this to the lock file!
So, I should change the lock file format to include sources as well, in a manner similar to how we currently store conda packages? Do you have any suggestions for implementing this? @baszalmstra |
|
Yes essentially. But we can also do that in a follow up PR, there is more we should add to the lockfile, like the variants. And/or we can only allow Without the pinned source in the lockfile the changes that a package will break is pretty large. |
I'll allow only |
6644620 to
9ae74fc
Compare
|
Touching the This should mention the This prints the error first in a tracing and after in the miette error. I would only do the miette error. Toml used for testing: [package.build.source]
git = "https://github.com/prefix-dev/pixi-build-testsuite.git"
rev = "ee87916a49d5e96d4f32268c3s650e8ff6b8866b"
subdirectory = "tests/data/pixi_build/cpp-with-path-to-source/project"
[package.build.backend]
channels = [
"https://prefix.dev/pixi-build-backends",
"https://prefix.dev/conda-forge",
]
name = "pixi-build-cmake"
version = "*"
[package]
name = "sdl_example"
version = "0.1.0"
[package.host-dependencies]
# This ensures that SDL2 is available at build time.
sdl2 = ">=2.26.5,<3.0"
[workspace]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["osx-arm64"]
preview = ["pixi-build"]
[dependencies]
sdl_example = { path = "." }
|
|
Changing the rev doesn't trigger a new checkout of the project. [package.build.source]
git = "https://github.com/prefix-dev/pixi.git"
rev = "1eec91ba3be59e93d487f61801882d05d6f76a6c"
#rev = "2e05115c55fd119b7296062d38081c57aa64fdeb"
subdirectory = "examples/pixi-build/cpp-sdl"Switching these two revs should give you two different It only triggered a rebuild but no refetch and reinstall. |
|
I don't agree on merging this without the I would expect the I would also like to have an example of this in the |
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.
Adding this to avoid accidental merging.
|
@remimimimimi could you resolve the merge conflict? |
|
The UX that I would like to have tested in integration test: Assuming this manifest: [package.build.source]
git = "url"
branch = "branch"Generate the lockfile with: Test that the correct Run: This should work and not error Now update the Run: This should error as the branch doesn't satisfy the lockfile Run: This should update the rev in the lockfile |
419cc05 to
5510994
Compare
020cc8b to
a98a259
Compare
|
This looks good to me! |
8df0f72 to
3f8348e
Compare
|
@Hofer-Julian There here's are the parts of the PR that would help you to review it more easily:
|
e9007c5 to
964da16
Compare
Add support for specifying a git source for the pixi build backend. As suggested, we now use
pin_and_checkoutfor source fetching.When source package is added to some environment its source will be pinned. Correspondingly
pixi buildwon't update lock file.Tests are added to
pixi-build-testsuitehere.Still draft as it depends on rattler release.