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

Implement ResourceCodeResolver.getLastModified #186

Merged
merged 1 commit into from Nov 21, 2022
Merged

Implement ResourceCodeResolver.getLastModified #186

merged 1 commit into from Nov 21, 2022

Conversation

andreblanke
Copy link
Contributor

Hot reloading is currently unsupport for ResourceCodeResolver due to getLastModified always returning 0. By implementing the method on a best-effort basis, hot reloading can be supported when the resource URL points to a regular file outside a JAR file which is usually the case during development time. A project which uses jte can then be rebuilt which will cause the changes to be reflected.

@edward3h
Copy link
Contributor

I ran into this issue before. Looks like a reasonable fix. 👍🏻

@casid
Copy link
Owner

casid commented Nov 20, 2022

@andreblanke thanks for the contribution! Right now, the ResourceCodeResolverTest fails, cause it isn't expecting this to work yet. Could you adjust the test and maybe add another test for the unhappy path, too?

@andreblanke
Copy link
Contributor Author

Ah, sorry for that. I tested it locally but didn't actually check the tests. I will fix it.

Update documentation and tests accordingly
@codecov-commenter
Copy link

Codecov Report

Base: 93.05% // Head: 93.00% // Decreases project coverage by -0.05% ⚠️

Coverage data is based on head (a303b32) compared to base (3c4cfc5).
Patch coverage: 66.66% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #186      +/-   ##
============================================
- Coverage     93.05%   93.00%   -0.06%     
- Complexity     1125     1126       +1     
============================================
  Files            63       63              
  Lines          2881     2886       +5     
  Branches        464      465       +1     
============================================
+ Hits           2681     2684       +3     
- Misses          107      109       +2     
  Partials         93       93              
Impacted Files Coverage Δ
...main/java/gg/jte/resolve/ResourceCodeResolver.java 83.33% <66.66%> (-6.15%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@casid casid merged commit a652891 into casid:main Nov 21, 2022
casid added a commit that referenced this pull request Nov 28, 2022
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.

None yet

4 participants