Skip to content

Only remove sibling paths from cargo manifests - #781

Merged
cottsay merged 2 commits into
masterfrom
cottsay/cargo-manifest-fixing
Sep 9, 2026
Merged

Only remove sibling paths from cargo manifests#781
cottsay merged 2 commits into
masterfrom
cottsay/cargo-manifest-fixing

Conversation

@cottsay

@cottsay cottsay commented Sep 2, 2026

Copy link
Copy Markdown
Member

We can leave direct references to crates in subdirectories.

This code hasn't been released yet so it's still safe to make critical changes to it.

Assisted-by: Gemini 3.5 Flash

We can leave direct references to crates in subdirectories.

Assisted-by: Gemini 3.5 Flash <gemini@google.com>
@cottsay
cottsay requested a review from Blast545 September 2, 2026 20:28
@cottsay cottsay self-assigned this Sep 2, 2026
@cottsay cottsay added the bug label Sep 2, 2026
@cottsay
cottsay requested a review from KmoM88 September 3, 2026 16:24

@Blast545 Blast545 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I mainly checked the tests and I'm confused, can you leave us a msg about why this is needed? and how it's failing.

I thought I was aware of the bug as per a previous discussion, but I don't get completely get it from test case covered.

'dependencies': {
'absolute_dep': {'path': '/abs/path/to/dep'},
'parent_dep': {'path': '../parent/dep'},
'sibling_dep': {'path': '../sibling'},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In my mental model, ../sibling it's a sibling of my current crate, correct, but I don't see why ../parent/dep it's a parent. Looks like it's a child of another sibling, a nephew?

Maybe I'm getting something wrong

@cottsay cottsay Sep 7, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is maybe just a mismatch in nomenclature between what I asked Gemini to do and how I write the commit description.

All of these paths are from the perspective of a package at it's root directory. We archive the packages from that directory, so anything above it (starting with ../) is removed by Bloom's package-level processing and will NOT be present when the package is built on the buildfarm.

Maybe we just call these sibling_dep and nested_sibling_dep. Doesn't really matter, either way they should be removed (and possibly converted to a version = '*' constraint).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe we just call these sibling_dep and nested_sibling_dep

That change sounds good to me then, that renaming would makes sense from the description and matches the test behavior

Comment on lines +106 to +110
assert 'path' not in deps['parent_dep']
assert deps['parent_dep']['version'] == '*'

assert 'path' not in deps['sibling_dep']
assert deps['sibling_dep']['version'] == '*'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As per the title description, I thought parent_dep and sibling_dep were going to have a different behavior

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, if this is the expected behavior, maybe it should be better aligned with the title

@cottsay
cottsay requested a review from Blast545 September 8, 2026 17:11

@Blast545 Blast545 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@cottsay
cottsay merged commit dd956a6 into master Sep 9, 2026
17 checks passed
@cottsay
cottsay deleted the cottsay/cargo-manifest-fixing branch September 9, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants