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

aQute.bnd.osgi.resource.FileResourceCache.getResource(File, URI) does not take URI into account #5740

Closed
laeubi opened this issue Aug 1, 2023 · 4 comments

Comments

@laeubi
Copy link
Contributor

laeubi commented Aug 1, 2023

If one generates a resource for the same file in a session one gets the resource with an old URI in the content capability.

That is because aQute.bnd.osgi.resource.FileResourceCache.getResource(File, URI) does not take the URI into account when computing the cache key.

laeubi added a commit to laeubi/tycho that referenced this issue Aug 1, 2023
BND currently cache file resources but not using the URL (see
bndtools/bnd#5740) as the cache key, because
of that it happens that if a mojo is called multiple times with the same
underlying file that a wrong URL is used.

This replaces the convenient call with an equivalent one that uses no
cache instead.
laeubi added a commit to eclipse-tycho/tycho that referenced this issue Aug 1, 2023
BND currently cache file resources but not using the URL (see
bndtools/bnd#5740) as the cache key, because
of that it happens that if a mojo is called multiple times with the same
underlying file that a wrong URL is used.

This replaces the convenient call with an equivalent one that uses no
cache instead.
github-actions bot pushed a commit to eclipse-tycho/tycho that referenced this issue Aug 1, 2023
BND currently cache file resources but not using the URL (see
bndtools/bnd#5740) as the cache key, because
of that it happens that if a mojo is called multiple times with the same
underlying file that a wrong URL is used.

This replaces the convenient call with an equivalent one that uses no
cache instead.

(cherry picked from commit 53d46f1)
laeubi added a commit to eclipse-tycho/tycho that referenced this issue Aug 3, 2023
BND currently cache file resources but not using the URL (see
bndtools/bnd#5740) as the cache key, because
of that it happens that if a mojo is called multiple times with the same
underlying file that a wrong URL is used.

This replaces the convenient call with an equivalent one that uses no
cache instead.

(cherry picked from commit 53d46f1)
@pkriens
Copy link
Member

pkriens commented Aug 7, 2023

Can you make a PR?

@pkriens
Copy link
Member

pkriens commented Sep 1, 2023

Do you want this in the 7.0.0 release cycle @laeubi ?

@laeubi
Copy link
Contributor Author

laeubi commented Sep 1, 2023

@pkriens as this is deep into BND internals I'm not sure if can contribute more than the initial analysis/problem description here.

@laeubi
Copy link
Contributor Author

laeubi commented Sep 1, 2023

Do you want this in the 7.0.0 release cycle @laeubi ?

Would be useful indeed.

@pkriens pkriens closed this as completed in 406301f Sep 5, 2023
pkriens added a commit that referenced this issue Sep 5, 2023
Fixes aQute.bnd.osgi.resource.FileResourceCache.getResource(File, URI) does not take URI into account #5740
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants