-
Notifications
You must be signed in to change notification settings - Fork 314
feat: allow using build backends from source #4145
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: allow using build backends from source #4145
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.
Just couple of comments, otherwise awesome!
#[test] | ||
fn test_disallow_source() { | ||
assert_snapshot!(expect_parse_failure( | ||
r#" | ||
backend = { name = "foobar", git = "https://github.com/org/repo" } | ||
"# | ||
)); | ||
} | ||
|
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 then we should expect it to parse, rather than removing test?
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.
These snapshot tests are there to snapshot the error message that is reported.
I want to add a full end-2-end test that should cover this. Or do you think we should also add explicit parsing (unit) tests?
Looking forward to test drive this with a few build backends that I have cooking. |
@nichmor @remimimimimi I wonder if there is a way we can test this without having to resort to a complex python based end-2-end test.. Maybe you have thoughts? |
Could write tests in rust using combination of assert_cmd and assert_fs. |
How I was thinking is that we can pin the backends from |
Because it is relatively slow, it needs to fetch repodata, fetch packages, install packages, and run external programs. That's why I introduced the in-memory backend, it allows us to completely remove that. |
Yeah true - do you think we could build them also from source? |
This PR enables using build backends from source specifications. E.g. you can build build-backends from source! We already had the machinery in place to do this but we just quite didnt have this enabled in the manifest yet. This PR now unlocks doing:
This doesnt work just quite yet because we currently have no
pixi.toml
s defined for any of our build backends. But that should be an easy fix!TODO