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

Project (re)load API, initial implementation #7651

Merged
merged 1 commit into from
Aug 26, 2024
Merged

Conversation

sdedic
Copy link
Member

@sdedic sdedic commented Aug 8, 2024

The motivation for this (still experimental) API is that often the user of maven/gradle/whatever project system can use abstract APIs, like classpath, now project dependencies, or subproject / container queries, but in order to work well, the project must be loaded to a "certain quality".

Also some operations, like modifications are better done on 'fresh' model. Each supported project has its own way how to report it reloads (e.g. through a PropertyChangeListener), and SOME of them have a way how to initate a reload and hook after the reload completes (gradle). Some not (maven). After some thinking I've created an abstraction mainly based on Gradle's better project description ... hybridized ;) with Maven's priming and re-loading.

And here it goes. This PR contains just an API. There will be additional PR(s) with Maven and Gradle implementation of this API that adapts Maven/Gradle internal features to this abstraction.

This a review draft, but I do not expect much changes as Maven implementation is already done (will be the next PR), I need to retrofit Gradle implementation.

@sdedic sdedic added Gradle [ci] enable "build tools" tests Maven [ci] enable "build tools" tests Platform [ci] enable platform tests (platform/*) kind:feature A feature request labels Aug 8, 2024
@sdedic sdedic added this to the NB24 milestone Aug 8, 2024
@sdedic sdedic self-assigned this Aug 8, 2024
@sdedic sdedic requested review from dbalek and lahodaj August 9, 2024 09:54
@sdedic sdedic marked this pull request as ready for review August 13, 2024 06:42
Copy link
Contributor

@dbalek dbalek left a comment

Choose a reason for hiding this comment

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

The proposed API looks reasonable to me. Thanks for adding a possibility to wait for project reloads when requesting the projects data.

@sdedic sdedic force-pushed the sdedic/project/reload branch from 88d86d3 to 6ea5e5e Compare August 26, 2024 12:18
@sdedic
Copy link
Member Author

sdedic commented Aug 26, 2024

squashed review commits

@sdedic sdedic merged commit 1e1f53c into master Aug 26, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gradle [ci] enable "build tools" tests kind:feature A feature request Maven [ci] enable "build tools" tests Platform [ci] enable platform tests (platform/*)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants