Skip to content
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

[Bug]: mtree_spec yield different result when built in an external repository #697

Closed
gzm0 opened this issue Dec 18, 2023 · 0 comments · Fixed by #696
Closed

[Bug]: mtree_spec yield different result when built in an external repository #697

gzm0 opened this issue Dec 18, 2023 · 0 comments · Fixed by #696
Labels
bug Something isn't working good first issue Good for newcomers: GitHub surfaces these specially help wanted Aspect isn't prioritizing this, but the community could

Comments

@gzm0
Copy link
Contributor

gzm0 commented Dec 18, 2023

What happened?

If an mtree_spec rule gets built from a different repository, the target paths will look like ../<repo name>/path/in/repo.

If the same target gets built inside <repo name> the path will be path/in/repo.

I suspect this is due to the (unprocessed) use of short_path here:

def _expand(file, expander, transform = lambda f: f.short_path):

Version

Reproducible in this repository.

How to reproduce

https://github.com/aspect-build/bazel-lib/pull/696

Any other information?

No response

@gzm0 gzm0 added the bug Something isn't working label Dec 18, 2023
@github-actions github-actions bot added the untriaged Requires traige label Dec 18, 2023
@alexeagle alexeagle added good first issue Good for newcomers: GitHub surfaces these specially help wanted Aspect isn't prioritizing this, but the community could and removed untriaged Requires traige labels Dec 19, 2023
alexeagle pushed a commit that referenced this issue Dec 20, 2023
* Reproduction for mtree_spec behaving different in other repo

* Fix the bug (but not the test)

* Fix the test

* Rename mtree_spec e2e dir to tar

* Fix bzlmod tests

* Remove unnecessary skylib dependency from e2e repos

* Add e2e tests to matrix

* Replace e2e test with a normal test

To do this, we somewhat abuse the skylib dependency, but that's
probalby OK.
gregmagolan pushed a commit that referenced this issue Mar 23, 2024
* Reproduction for mtree_spec behaving different in other repo

* Fix the bug (but not the test)

* Fix the test

* Rename mtree_spec e2e dir to tar

* Fix bzlmod tests

* Remove unnecessary skylib dependency from e2e repos

* Add e2e tests to matrix

* Replace e2e test with a normal test

To do this, we somewhat abuse the skylib dependency, but that's
probalby OK.
gregmagolan pushed a commit that referenced this issue Mar 23, 2024
* Reproduction for mtree_spec behaving different in other repo

* Fix the bug (but not the test)

* Fix the test

* Rename mtree_spec e2e dir to tar

* Fix bzlmod tests

* Remove unnecessary skylib dependency from e2e repos

* Add e2e tests to matrix

* Replace e2e test with a normal test

To do this, we somewhat abuse the skylib dependency, but that's
probalby OK.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers: GitHub surfaces these specially help wanted Aspect isn't prioritizing this, but the community could
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants