Skip to content

Conversation

@tdejager
Copy link
Contributor

@tdejager tdejager commented Oct 27, 2025

This should fix: #4837

We now save the glob-root, so where need to start globbing for the file for changes. We save this in the metadata cache, this does invalidate the current entries though, we could also opt to version it to v-2. Wdyt?

The test-suite change is here: prefix-dev/pixi-build-testsuite#91

@tdejager tdejager changed the title fix: save and fix for rebuilds fix: save glob-root for correct rebuilds Oct 28, 2025
/// E.g we are building from `package.build.source.path = "../"` we want
/// to resolve globs from that location
#[serde(default, skip_serializing_if = "Option::is_none")]
pub glob_root: Option<PathBuf>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the new field.

alias = "source_code_root",
alias = "input_root"
)]
pub glob_root: Option<PathBuf>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This as well.

return Ok(Some(metadata));
};

let Some(cached_root) = metadata.glob_root.as_ref() else {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here we regenerate if its not found.

.await
.map_err_with(SourceBuildCacheStatusError::SourceCheckout)?;

let Some(glob_root) = source_info.glob_root.as_ref().cloned() else {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same here.

@tdejager tdejager requested a review from Hofer-Julian October 29, 2025 08:57
@tdejager tdejager marked this pull request as ready for review October 29, 2025 08:57
@Hofer-Julian
Copy link
Contributor

We save this in the metadata cache, this does invalidate the current entries though, we could also opt to version it to v-2

I assumed that we would only bump this if we were to make a breaking change in the metadata.json file.

@lucascolley lucascolley added bug Something isn't working area:build Related to pixi build labels Oct 29, 2025
@Hofer-Julian
Copy link
Contributor

@tdejager and I further discussed the version bump of the metadata cache, and we agreed that we should indeed bump it and then make the glob_root a required parameter.

@tdejager
Copy link
Contributor Author

Now that I'm thinking about it, I feel this is not the correct approach, because we should have the data available, we also have it in the discovery code, so I need to close this for now. I might need: #4446 actually first? @remimimimimi lets discuss.

@tdejager tdejager closed this Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:build Related to pixi build bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Out-of-tree sources with pixi build always rebuild

4 participants