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

Trigger restart when deleting previously existing watched file #25376

Merged
merged 1 commit into from May 10, 2022

Conversation

Postremus
Copy link
Member

@Postremus Postremus commented May 4, 2022

Also fixes naming of the processor responsible for the initial watched files scan

Fixes #25331

@quarkus-bot quarkus-bot bot added the area/core label May 4, 2022
@quarkus-bot

This comment has been minimized.

@Postremus
Copy link
Member Author

Will have to take a closer look why the maven tests failed, looks related.

@Postremus
Copy link
Member Author

Postremus commented May 5, 2022

Setting to draft, I want to do a full CI run in my fork first. I also need to possible do a bit more cleanup before this is ready.
DevMojoIT#testThatMultipleResourceDirectoriesAreSupported now passes locally though.

I found the reason why the tests where failing.
It is related to them having multiple resource directories, and me introducing deletion of single files in target/classes when these get deleted in the resource directory.

Basicly, it went like this.
resource-dir-a: contained application.properties
resource-dir-b: no application.properties

First, resource-dir-a was checked. application.properties was found - no need to delete anything.
resource-dir-b got checked for application.properties. which was not found. Now, the file got deleted from the outputdir, even though it existed in another resource root.

@Postremus Postremus marked this pull request as draft May 5, 2022 20:50
@Postremus Postremus force-pushed the issues/25331 branch 2 times, most recently from b27f048 to 295e57c Compare May 6, 2022 20:34
@Postremus Postremus marked this pull request as ready for review May 6, 2022 20:35
@Postremus
Copy link
Member Author

CI passes in my fork, this is now ready for review.

@Postremus Postremus requested a review from aloubyansky May 6, 2022 20:36
Copy link
Member

@aloubyansky aloubyansky left a comment

Choose a reason for hiding this comment

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

Looks good, @Postremus, thanks! Would be good to have a test for it though. Will you have time to add one? Just in case it helps, we already have some test projects that include extensions, e.g. https://github.com/quarkusio/quarkus/tree/main/integration-tests/maven/src/test/resources-filtered/projects/project-with-extension.

Also fixes naming of the processor responsible for the initial watched files scan
@Postremus
Copy link
Member Author

@aloubyansky I added one in DevMojoIT.

@aloubyansky
Copy link
Member

Excellent. Thanks @Postremus !

@aloubyansky aloubyansky merged commit bd8d92b into quarkusio:main May 10, 2022
@quarkus-bot quarkus-bot bot added this to the 2.10 - main milestone May 10, 2022
@Postremus Postremus deleted the issues/25331 branch May 10, 2022 06:06
@gsmet gsmet modified the milestones: 2.10 - main, 2.9.1.Final May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleting a watched file in dev mode doesn't trigger a restart
3 participants