desruisseaux commented on PR #2219:
URL: https://github.com/apache/maven/pull/2219#issuecomment-2889112320

   I think that the `DefaultDependencyResolverResult` constructor is creating 
some confusion. I created a new pull request that I propose as an alternative 
to this one: #2347. For seeing the purpose, there is two design constraints to 
consider:
   
   * In order to be useful, `PathModularizationCache` needs to live longer than 
`DefaultDependencyResolverResult`. Any change that makes the lifetime of those 
two objects strongly coupled make the cache close to useless.
   * At the time I wrote these classes, I didn't know how session-wide caches 
should be managed in Maven (I still haven't investigated). Therefore, 
`PathModularizationCache` was instantiated together with 
`DefaultDependencyResolverResult` *as a temporary workaround, until we learn 
more about how session-wide caches are managed in Maven.*
   
   The pull #2347 tries to address the same issue as this pull request, but in 
a way that makes more apparent that `DefaultDependencyResolverResult` and 
`PathModularizationCache` lifetimes are distinct in principle, and that the 
current coupling may be temporary.


-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to