You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "cstamas (via GitHub)" <gi...@apache.org> on 2025/11/19 13:58:36 UTC
[PR] GURK [maven-resolver]
cstamas opened a new pull request, #1679:
URL: https://github.com/apache/maven-resolver/pull/1679
New opt-in feature for enhanced local repository: produce globally unique repository keys.
WIP
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Repository Key Function SPI [maven-resolver]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas merged PR #1679:
URL: https://github.com/apache/maven-resolver/pull/1679
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Repository Key Function SPI [maven-resolver]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on code in PR #1679:
URL: https://github.com/apache/maven-resolver/pull/1679#discussion_r2577433182
##########
maven-resolver-api/src/main/java/org/eclipse/aether/repository/WorkspaceRepository.java:
##########
@@ -27,11 +28,14 @@
* the contained artifacts is handled by a {@link WorkspaceReader}.
*/
public final class WorkspaceRepository implements ArtifactRepository {
+ public static final String ID = "workspace";
private final String type;
private final Object key;
+ private final int hashCode;
Review Comment:
Yes, they are quite often in lists and collections. Maybe not as often as RemoteRepository instances, but I think this is okay to do.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Repository Key Function SPI [maven-resolver]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on code in PR #1679:
URL: https://github.com/apache/maven-resolver/pull/1679#discussion_r2577424322
##########
maven-resolver-api/src/main/java/org/eclipse/aether/repository/WorkspaceRepository.java:
##########
@@ -27,11 +28,14 @@
* the contained artifacts is handled by a {@link WorkspaceReader}.
*/
public final class WorkspaceRepository implements ArtifactRepository {
+ public static final String ID = "workspace";
private final String type;
private final Object key;
+ private final int hashCode;
Review Comment:
Caching hashCode could be seen as a premature optimisation. They are more often kept in lists afaik, aren't they ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Introduce repository-key function and make it consistently used [maven-resolver]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #1679:
URL: https://github.com/apache/maven-resolver/pull/1679#issuecomment-3585609759
> New opt-in **experimental** feature for enhanced local repository: ability to choose "repository key" function. Local repository (simple and enhanced) by default uses the `simple` key (historically) where other places all used `nid`. Have to note, that `simple` is technically equivalent to `nid` as `RemoteRepository.isRepositoryManager()` is not set anywhere in Maven.
>
> Added key functions:
>
> * `simple` -> the original code in LRM
> * `nid` -> `norm(id)` (path friendly)
> * `hurl` -> `sha1(url)`
> * `nid_hurl` -> `norm(id)-sha1(url)`
> * `gurk` -> `norm(id)-sha(seed)` where "seed" is all config properties of repo
> * `ngurk` -> `norm(id)-sha(seed)` where "seed" is all config sans mirror list (just the string "isMirrored" is added for mirrors)
Fwiw, since this is switching to a more mathematical expression, I was confused by the `-` which, when I first read, though it was `minus`. I wonder if we could use a different separator such as `+` or `.`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org