Development Plan for 2025-04-02
Goals
- Create initial implementation plan for Mill build tool support
- Investigate Mill extension development approach
- Design the basic structure of IWMill components
- Begin researching key differences between SBT and Mill builds
Tasks
1. Research Mill Build Structure (2 hours)
2. Analyze Existing SBT Components (1.5 hours)
3. Design Mill Components Structure (2 hours)
4. Create Proof of Concept (2.5 hours)
Findings Summary
Mill vs SBT Differences
- Mill uses regular Scala code in
build.sc
files instead of SBT's DSL
- Mill modules are objects extending traits instead of SBT's project definitions
- Mill uses
ivy"org::name:version"
syntax instead of SBT's "org" %% "name" % "version"
- Mill features a more direct trait-based extension model versus SBT's plugin system
- Mill tasks are defined as methods with explicit dependencies
Mill Extension Development
- Mill extensions are regular JVM libraries that can be published to Maven
- Shared functionality is provided through traits that modules can extend
- No formal plugin system or activation - users explicitly mix in traits
- Creating extensions is simpler and requires less boilerplate
Implementation Approach
- Create a dedicated library (
mill-iw-support
or similar) with:
- IWMillVersions for centralized version management
- IWMillDeps for standardized dependency definitions
- IWScalaModule trait for standard module configuration
- IWPublishModule trait for publishing configuration
- Publish to IW Maven repositories
- Users add the library as a dependency in their
build.sc
files
Implementation Progress
- Created project structure for
mill-iw-support
library
- Implemented IWMillVersions object with all library versions
- Implemented IWMillDeps object with core dependency definitions
- Created IWScalaModule trait with standard compiler options
- Created IWPublishModule trait for IW Maven repositories
- Created a working example project structure
- Documented usage in README.md
Success Criteria
- Completed research on Mill build structure and extension development ✅
- Analyzed existing SBT components for equivalent Mill implementation ✅
- Designed structure for Mill component equivalents ✅
- Created detailed implementation plan for Mill support library ✅
- Created initial proof of concept for validation ✅
Next Steps
- Expand the proof of concept with more components
- Test building and publishing the library
- Create a more comprehensive example with multiple modules
- Test integration with real-world projects
- Begin writing migration guides and documentation
Notes and Considerations
- Mill's trait-based approach is a better fit for creating composable, reusable components
- Unlike SBT plugins, Mill extensions are just regular libraries, simplifying development
- Mill's syntax and structure are more intuitive and approachable than SBT
- Cross-building in Mill uses a different approach with
Cross[Module]
that needs careful consideration
- Need to ensure our Mill solution has feature parity with our SBT solution
- For next development session, focus on adding cross-platform (JVM/JS) support