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

Improve devtools trigger-file documentation #17775

Closed
forketyfork opened this issue Aug 3, 2019 · 1 comment

Comments

@forketyfork
Copy link

commented Aug 3, 2019

The devtools documentation for Spring Boot 2.1.6 proposes to use a "trigger file" in case of incremental compilation in the IDE, to make sure we upload all class file changes only at a specific time. The docs state the following:

Changing the file only triggers the check and the restart only occurs if Devtools has detected it has to do something. The trigger file can be updated manually or with an IDE plugin.

To use a trigger file, set the spring.devtools.restart.trigger-file property to the path of your trigger file.

From this I expected that the file may be put anywhere on the filesystem and monitored by the watcher, and upon its change the accumulated changes in the classpath folders are uploaded to the server.

While examining the source code of Devtools, I've discovered that:

  • this property value is used in the TriggerFileFilter class for matching, however, not as a full path, but as a simple file name
  • this filter is used to filter out the changes in the monitored classpath directories only, and consequently trigger reload only on this specific file change

If my understanding is correct, I believe it's worth adjusting the docs as follows:

  • explicitly state that the spring.devtools.restart.trigger-file property is a simple file name, not a path
  • state that the file has to be located on the application classpath
  • provide an example on how to automate the update of this file both for local and for remote devtools setup, by elaborating on the mentioned "IDE plugin" functionality (through some extensive googling, I've found that the Spring Boot run configuration in IntelliJ IDEA is capable of producing and updating the trigger file when running devtools in local mode, but I don't believe there's something similar for the remote mode, so it would be nice to refer to a working example)
@philwebb philwebb added this to the 2.1.x milestone Aug 3, 2019
@philwebb philwebb changed the title The trigger-file devtools functionality seems to be described incorrectly in the docs Improve devtools trigger-file documentation Aug 3, 2019
@mbhave mbhave self-assigned this Aug 9, 2019
@philwebb philwebb modified the milestones: 2.1.x, 2.1.8 Sep 5, 2019
@philwebb philwebb closed this in a0a204a Sep 5, 2019
@philwebb

This comment has been minimized.

Copy link
Member

commented Sep 5, 2019

Thanks for reporting this @forketyfork. I've tried to clarify things for the next release. I added a small note about IDE support but didn't add any comment about the remote mode in the end. I was worried about that information getting stale and I felt it would be better in the IDE documentation.

@mbhave mbhave removed their assignment Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.