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

Fix stale resource link flags after project re-open #473

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trancexpress
Copy link
Contributor

@trancexpress trancexpress commented Jun 1, 2023

Whenever a project is closed, its resource tree is saved. This includes
linked resources in the project. When the project is re-opened, link
changes in the .project file are not reflected on the projects resource
tree. The old resource tree is read, new information is stored in
ProjectDescription.linkDescriptions, but the old linked resources are
not touched.

This change adjusts Project.open() and Project.close() to set resp.
clear the M_LINK flag of linked resources in the project.

Fixes: #470

@trancexpress trancexpress changed the title WIP, DONT MERGE Fix stale link information for folder after project re-open Jun 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2023

Test Results

   639 files  ±0     639 suites  ±0   38m 49s ⏱️ - 2m 29s
 3 950 tests +1   3 928 ✅ +1   22 💤 ±0  0 ❌ ±0 
12 456 runs  +3  12 295 ✅ +3  161 💤 ±0  0 ❌ ±0 

Results for commit fc5d071. ± Comparison against base commit 1012283.

♻️ This comment has been updated with latest results.

@trancexpress trancexpress changed the title Fix stale link information for folder after project re-open Fix stale resource link flags after project re-open Jun 1, 2023
@trancexpress
Copy link
Contributor Author

I'm not sure if this is a good fix, code-wise it doesn't seem like a good change. So far I don't have an idea how a good fix would look like. But lets see how test results look like.

@akurtakov
Copy link
Member

What is the status of this one?

@iloveeclipse
Copy link
Member

What is the status of this one?

Waits for a review

@mickaelistria
Copy link
Contributor

FWIW, I have trouble to properly understand the use-case. @trancexpress would it be possible to add a test that would demonstrate how to trigger the issue?

Whenever a project is closed, its resource tree is saved. This includes
linked resources in the project. When the project is re-opened, link
changes in the .project file are not reflected on the projects resource
tree. The old resource tree is read, new information is stored in
ProjectDescription.linkDescriptions, but the old linked resources are
not touched.

This change adjusts Project.open() and Project.close() to set resp.
clear the M_LINK flag of linked resources in the project.

Fixes: eclipse-platform#470
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
Copy link
Member

@iloveeclipse iloveeclipse left a comment

Choose a reason for hiding this comment

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

Thanks Simeon, this is a very complex code here and very nice to have a working test.

I've wrote my understanding of the problem and proposed solution idea.

I've pushed rebased, merged & updated PR here to get it easier for the future work - there were massive changes in the resource tests area on master and so the test was not compilable anymore.

Now it compiles & works again.

I believe the code change itself is not enough, I believe we need a different approach which I've tried to draft in #470 (comment).

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

Successfully merging this pull request may close these issues.

Project description links information is not reconciled on project close and reopen
4 participants