Skip to content

GH-1053: force target files to be writable when embedSourcesInClassOutputs is true - #1054

Merged
ascopes merged 1 commit into
ascopes:mainfrom
hypnoce:make_target_file_writable
Sep 13, 2026
Merged

ascopes merged 1 commit into
ascopes:mainfrom
hypnoce:make_target_file_writable

Conversation

@hypnoce

@hypnoce hypnoce commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Fixes GH-1053.

@ascopes ascopes left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for raising a fix!

One small comment, hope that is okay!

I did wonder whether it is possible to make an integration test case for this as well by copying one of the existing ones and removing the write flags on Git. It might not be simple to do that for Windows though so not too worried if not.

@ascopes ascopes added the bug Something isn't working label Sep 13, 2026
@ascopes
ascopes self-requested a review September 13, 2026 08:13
@hypnoce
hypnoce force-pushed the make_target_file_writable branch from f5f2b7c to 6984fdf Compare September 13, 2026 13:59
@hypnoce
hypnoce force-pushed the make_target_file_writable branch from 6984fdf to 8ad0a71 Compare September 13, 2026 14:00
@hypnoce

hypnoce commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

@ascopes I remove the writable check and added an integration test that should work both on unix (linux, macos) and dos (windows).

@ascopes

ascopes commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Thanks for updating, looks good to me.

Once the pipeline is green, I'll merge it and tag it so it is on Maven Central for you 👍

@ascopes
ascopes merged commit 89ea73d into ascopes:main Sep 13, 2026
13 checks passed
@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.94737% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.37%. Comparing base (e48173e) to head (8ad0a71).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...thub/ascopes/protobufmavenplugin/fs/FileUtils.java 78.95% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1054      +/-   ##
==========================================
- Coverage   94.51%   94.37%   -0.14%     
==========================================
  Files          78       78              
  Lines        2056     2075      +19     
  Branches      132      134       +2     
==========================================
+ Hits         1943     1958      +15     
- Misses         79       83       +4     
  Partials       34       34              
Flag Coverage Δ
maven-3.9.16-java-17-macos-26 92.29% <78.95%> (-0.12%) ⬇️
maven-3.9.16-java-17-ubuntu-24.04 93.26% <78.95%> (-0.13%) ⬇️
maven-3.9.16-java-17-ubuntu-24.04-arm 92.29% <78.95%> (-0.12%) ⬇️
maven-3.9.16-java-17-windows-2025 92.29% <78.95%> (-0.12%) ⬇️
maven-3.9.16-java-21-ubuntu-24.04 93.26% <78.95%> (-0.13%) ⬇️
maven-3.9.16-java-21-windows-11-arm 92.29% <78.95%> (-0.12%) ⬇️
maven-3.9.16-java-25-ubuntu-24.04 93.26% <78.95%> (-0.13%) ⬇️
maven-3.9.6-java-17-ubuntu-24.04 93.26% <78.95%> (-0.13%) ⬇️
maven-4.0.0-rc-5-java-17-ubuntu-24.04 93.26% <78.95%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...thub/ascopes/protobufmavenplugin/fs/FileUtils.java 94.60% <78.95%> (-5.40%) ⬇️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: java.nio.file.AccessDeniedException copying read-only source files

2 participants