-
Notifications
You must be signed in to change notification settings - Fork 326
Use destination URI when creating resource during copy refactoring #3588
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
base: main
Are you sure you want to change the base?
Conversation
When performing a COPY refactoring, the ResourceRelocationContext created the resource with the original URI and then changed the URI of the resource after loading. This left any proxy URIs in the loaded resource still pointing to the original file. When later resolving the proxies, a second resource for the original file was created on demand and any local references were resolved into that resource and not the copy. This avoids the problem by creating the resource with the destination URI instead, so that any proxies will be created with the correct URI.
Test Results 6 465 files + 1 614 6 465 suites +1 614 3h 37m 47s ⏱️ + 1h 14m 38s Results for commit f871b91. ± Comparison against base commit d53cb3c. ♻️ This comment has been updated with latest results. |
|
Wonder if this can somehow be tested |
|
@mx990 just for confirmation: are the added tests FAIL without your patch? |
|
Yes, (most of) the added tests fail without my patch when running them locally against main. |
a69c9c0 to
d083cf6
Compare
| @@ -0,0 +1,175 @@ | |||
| /** | |||
| * Copyright (c) 2017, 2020 TypeFox GmbH (http://www.typefox.io) and others. | |||
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.
just 2026
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.
done
| import org.junit.runner.RunWith; | ||
|
|
||
| /** | ||
| * @author koehnlein - Initial contribution and API |
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.
you should add you here
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.
done
This adds tests for the copy resource refactoring based on the Java copy processor.
d083cf6 to
f871b91
Compare
When performing a
COPYrefactoring, theResourceRelocationContextcreated the resource with the original URI and then changed the URI of the resource after loading. This left any proxy URIs in the loaded resource still pointing to the original file. When later resolving the proxies, a second resource for the original file was created on demand and any local references were resolved into that resource and not the copy.This avoids the problem by creating the resource with the destination URI instead, so that any proxies will be created with the correct URI.
Fixes #3587