-
Notifications
You must be signed in to change notification settings - Fork 141
[MRESOLVER-282] Drop PartialFile use #212
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
Conversation
michael-o
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation needs to be skipped as well
...nnector-basic/src/main/java/org/eclipse/aether/connector/basic/BasicRepositoryConnector.java
Outdated
Show resolved
Hide resolved
...lver-connector-basic/src/main/java/org/eclipse/aether/connector/basic/ChecksumValidator.java
Show resolved
Hide resolved
Drop all those temp files workarounds, use new utility instead.
...olver-transport-wagon/src/main/java/org/eclipse/aether/transport/wagon/WagonTransporter.java
Show resolved
Hide resolved
michael-o
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No objections, but I would expect this PR run with a custom Maven build through all Core ITs and if they pass this is good to merge.
This is HTTP Connector, while for Wagon it is alrady true (see prev commit).
| Files.copy( is, tempFile.getPath(), StandardCopyOption.REPLACE_EXISTING ); | ||
| } | ||
| try ( InputStream is = Files.newInputStream( tempFile.getPath() ) ) | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that you would rather use https://www.javadoc.io/doc/org.apache.httpcomponents/httpcore/4.4.4/org/apache/http/HttpEntity.html#writeTo(java.io.OutputStream)..
...nnector-basic/src/main/java/org/eclipse/aether/connector/basic/BasicRepositoryConnector.java
Show resolved
Hide resolved
michael-o
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good.
gnodet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Any particular reason to remove the resume feature ? Does it cause known problems or is that just a code clean up ?
Both: is cleanup of ancient code, but also causes issues as devs reported (IDE + Maven got stuck in infinite loop due file lock), and after all, this code predates SyncContext that handles file locking now instead. Am unsure how much "resume download" was actually used, given it was ONLY http transport capable of (Wagon is 99% used by users and it is NOT capable of resuming). |
|
Resolve #957 |
1 similar comment
|
Resolve #957 |
Drop PartialFile, clean up regarding resource handling and lessen temp file use. Downside: there is no "download resume" happening anymore.
On the other hand, from now on, resolver will download "all or nothing", so no more "partial downloads" can happen either.
HttpClientTransport is STILL ABLE to resume downloads (was the only one anyway), but due removal of PartialFile it will never resume. Later we may replace removed logic with something simpler.
https://issues.apache.org/jira/browse/MRESOLVER-282