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

Provide a new Resources API #76

Open
laeubi opened this issue Nov 10, 2023 · 1 comment
Open

Provide a new Resources API #76

laeubi opened this issue Nov 10, 2023 · 1 comment

Comments

@laeubi
Copy link
Collaborator

laeubi commented Nov 10, 2023

Currently we mix resource changes with logging functions what is quite confusing, beside that the current API has some drawbacks and needs clarification in some cases.

Therefore we should split this into an own package and design a new more modern API (e.g. using Path instead of file, Streams instead of scanners and so on...).

Beside that there is currently a flaw in design that a delete scanner is not really reliable in all cases, e.g. assume a file is deleted outside of control of the provider it won't be noticed. On the other hand files might be left over of previous operations where a copy is involved are hard to track.

For this purpose there should be a new method that allows to mark a file as produced by the plugin together with a way to query all files. A plugin can then collect the files into a set, remove all processed ones and delete the leftover afterwards.

@laeubi laeubi changed the title Provide a new ResourceChanged API Provide a new Resources API Jun 30, 2024
@laeubi
Copy link
Collaborator Author

laeubi commented Jun 30, 2024

There should also be a way to mark a resource as "derived", e.g. eclipse allow to mark a resource as a derived resource and warns the user if it will be edited. This is very useful for generators that usually will overwrite any changes from a user on each generation step.

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

1 participant