-
Notifications
You must be signed in to change notification settings - Fork 351
feat: use command dispatcher for pixi build #4156
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
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.
Great work :)
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.
Awesome!
let file_name = built_source | ||
.output_file | ||
.file_name() | ||
.expect("the build backend did not return a file name"); |
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.
should it be an error? or it is something that we expect to never really happen?
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.
No, if this happened, then the backend returned an empty string.
Outputs { outputs: Vec<CondaOutput> }, | ||
} | ||
|
||
impl CachedCondaMetadata { |
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 was thinking, does it make sense to make SourceMetadataCache::entry a trait that return CachedCondaMetadata?
and we implement it for SourceMetadataCache?
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.
What is the point of adding a trait though? Its not reused.
|
||
// Canonicalize the output directory and package path. | ||
let output_dir = dunce::canonicalize(&args.output_dir) | ||
.expect("failed to canonicalize output directory which must now exist"); |
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.
same here - should we make it a nice error?
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.
No this cannot happen due to user error. If at this point the output directory cannot be canonicalized it means that the build didnt actually put a package there which is a developer error if thats the case.
This PR updates the
pixi build
command to use the command dispatcher and with it the latest protocol version.