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

Warn/inform user after updating feature set such that generated XSD is now stale #252

Open
scottkurz opened this issue Nov 28, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@scottkurz
Copy link
Member

See #139 (comment).

Not sure how this would be done in Liberty Tools Eclipse.

@cherylking
Copy link
Member

Just noting here that if this is implemented, we would want the same message presented in IntelliJ IDEA and Visual Studio Code.

@scottkurz scottkurz added the enhancement New feature or request label Feb 7, 2023
@scottkurz scottkurz changed the title Warn/inform user after editing a feature that a save is needed to view new server.xml config elements (to regen XSD) Warn/inform user after updating feature set such that generated XSD is now stale Nov 15, 2023
@scottkurz
Copy link
Member Author

Originally we'd titled this as "warn user that a save is needed" (in order to cause a .libertyls refresh, assuming LMP 3.7.1), when adding a new feature.

However, if we broaden our view a bit... a very similar scenario arises when dev mode has been run earlier, and an XSD has already been generated, and now dev mode is stopped. If a user at this point updates the feature set, they are similarly going to be stuck with a stale XSD.

Perhaps the thing to detect is that the <featureManager> content has a newer delta than the generated XSD file timestamp on disk?

Though this might present a challenge.... what if the XML LS was started after the new feature was added? Either it was added outside of the IDE or perhaps a new instance of the XML LS has started since the edit took place.

@scottkurz
Copy link
Member Author

Just noting here that if this is implemented, we would want the same message presented in IntelliJ IDEA and Visual Studio Code.

This issue really belongs in the LCLS, doesn't it... I'm going to transfer it there. Also going to queue it up for a design issues call since this is non-trivial.

@scottkurz scottkurz transferred this issue from OpenLiberty/liberty-tools-eclipse Nov 15, 2023
@cherylking
Copy link
Member

However, if we broaden our view a bit... a very similar scenario arises when dev mode has been run earlier, and an XSD has already been generated, and now dev mode is stopped. If a user at this point updates the feature set, they are similarly going to be stuck with a stale XSD.

The Liberty Maven/Gradle plugin deletes the .libertyls directory and all of its contents when feature(s) get installed in order to force the regeneration of the schema and feature list xml. The next time the project is opened in Liberty Tools and the user edits the server.xml, LCLS will detect that it needs to generate the schema and feature list xml.

But I think the initial issue remains, when they modify the features in the server.xml and have not saved the file (while running dev mode), or they saved the file but have not rebuilt the project by starting dev mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants