-
Notifications
You must be signed in to change notification settings - Fork 39
refactor: split tooling api from builder code #1500
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
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
This comment was marked as outdated.
This comment was marked as outdated.
| @JvmRecord @Serializable public data class CatalogBundle internal constructor ( | ||
| @JvmRecord @Serializable public data class CatalogBundle( |
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.
these all change often enough that it would be good to preserve internal if we can, otherwise the api pins will change constantly on this, and any coupling will break
maybe that's unavoidable anyway but effectively we've got two API surfaces here: pkl and the kotlin objects. if we could keep one of those internal and only couple to the public API surface in pkl, it would be ideal; thoughts? otoh we don't have codegen for this yet and adding @JvmStatic entrypoints would be a lot of code.
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.
I moved the codec implementations to the tooling module (which I probably should have done before), so now there's no need for those constructors to be exposed.
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
|
Claude finished @darvld's task —— View job PR Review: Tooling API RefactoringReviewing this large refactoring that splits the tooling module into separate concerns. Todo List:
Analysis Results✅ Architectural DesignThe refactoring achieves its stated goals well:
✅ Module Structure & Dependencies
✅ Code Migration Quality
✅ Implementation Details
Issues Found🚨 Critical IssueService registration mismatch in
🔧 Minor Issues
Recommendations💡 Suggestions
Security & Performance
ConclusionThis is a well-executed refactoring that successfully achieves its architectural goals. The separation of concerns is clean, imports are properly updated, and the module structure will serve IDE integrations well while keeping build complexity isolated. Recommendation: ✅ Approve with fix - Address the service registration issue, then this refactoring improves the codebase architecture without introducing risks. |
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
packages/tooling/src/test/kotlin/elide/tooling/codecs/maven/RepositorySystemFactory.kt
Show resolved
Hide resolved
|
Claude finished @darvld's task —— View job PR Review: Tooling API Refactoring Reviewing this large refactoring that splits the tooling module into separate concerns. Todo List:
Analysis Results✅ Architectural DesignThe refactoring achieves its stated goals excellently:
✅ Module Structure & Dependencies
✅ Code Migration Quality
✅ Implementation Details
✅ Testing Infrastructure
Security & Performance
Test CoverageThe 1.59% patch coverage is expected and acceptable for this type of refactoring:
ConclusionThis is a well-executed refactoring that successfully achieves its architectural goals. The separation of concerns is clean, imports are properly updated, and the module structure will serve IDE integrations well while keeping build complexity isolated. Recommendation: ✅ Approve - This refactoring significantly improves the codebase architecture without introducing risks. |
Summary
This PR refactors the
toolingmodule, moving part of it to a newbuilderpackage, which now contains all code related to Elide's build tools. The goal is to keep intoolingonly the public APIs that third-party integrations expect when interfacing with Elide, for example, to provide IDE support, which will be prototyped in an upcoming Pull Request.Note
The module name changes are up for discussion; a rationale is provided below for the current choice.
Motivation
Certain features of Elide's tooling, such as lockfiles and project manifests, can be very useful for developing integrations with IDEs and other tools; however, they are currently mixed in with the code that configures and builds user projects. Since integrations are unlikely to call said code directly (they would use the Elide binary instead), it would be convenient for them to have access to only the APIs and models necessary to understand an Elide project, while ensuring that their behavior is consistent with the Elide distributions being used.
Notable changes
toolingmodule now only contains code related to Elide Lockfile management, abstract tool APIs (basic interfaces that are specialized and implemented in the CLI), and part of the project manifest code.buildermodule was added to contain all logic related to resolving, configuring, and building Elide projects, based on the API definitions fromtooling.enginehave been moved totooling, specifically, those formerly in theelide.toolpackage (now inelide.tooling, for naming consistency).EnvVarsealed interface hierarchy, which is used across several modules, and was previously nested within the env plugin in thegraalvmmodule, has been moved tobase; this allows it to be used by all modules freely without becoming coupled to most of the runtime transitively. Since the concept of resolvable environment variables is generic enough, the change has no significant semantic implications.elide.tool->elide.toolingoutside of theclimodule).