feat: macro robustness, integration tests, and project-level lockfile management#7
Closed
arcaputo3 wants to merge 3 commits into
Closed
feat: macro robustness, integration tests, and project-level lockfile management#7arcaputo3 wants to merge 3 commits into
arcaputo3 wants to merge 3 commits into
Conversation
…ntexts
The Expr pattern matching approach (.matches, Varargs) broke when
bun"..." was used inside another macro's generated code (e.g., utest
Tests{}). Rewrite to direct TASTy tree inspection which handles
Inlined/Typed/Repeated wrappers from macro expansion.
Also fix validation bug: @/bad (empty scope name) was not caught
because only the package name after the slash was checked.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…validation - invalid-bun-literal: verifies bun"" fails compilation in a real build.mill context (validates macro error reporting end-to-end) - scalajs-dependency-manifests: tests manifest embedding in published JARs, local optional dep flow, and classpath manifest scanning for dev + optional deps - StubBunModule pattern overrides runBun to avoid needing real Bun Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Developers can now commit bun.lock at the workspace root for deterministic JS dependency resolution across clean builds and CI. - bunWorkspaceLockfile (BunToolchainModule): Task.Input that detects bun.lock at workspace root and triggers re-evaluation on changes - bunInstall/npmInstall: seed from workspace lockfile when present, giving bun a known-good resolution baseline - bunUpdateLock command: runs bun install without --frozen-lockfile, copies generated lockfile back to workspace root for committing - Applied symmetrically to BunScalaJSModule and BunTypeScriptModule (including test module inner npmInstall) Workflow: mill myApp.bunUpdateLock # generate/update bun.lock git add bun.lock && git commit # CI: override bunFrozenLockfile = true to enforce Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #6. Three workstreams combined into one PR:
bun"..."string interpolator fromExprpattern matching to TASTy tree inspection, fixing breakage inside nested macro contexts (e.g., utestTests{}). Also fixes validation bug where@/bad(empty scope) passed validation.BunDependencyManifestIntegrationTestscovering invalid literal detection, manifest embedding in published JARs, and transitive dep flow through classpath scanning. UsesStubBunModulepattern to avoid needing real Bun.bun.lockat workspace root for deterministic builds. NewbunUpdateLockcommand regenerates the lockfile, andbunInstall/npmInstallseed from it when present.Lockfile workflow
Applied symmetrically to
BunScalaJSModuleandBunTypeScriptModule.Test plan
./mill millbun.compile— compiles cleanly./mill millbun.test— all 30 unit tests pass./mill millbun.integration— integration tests (manifest + invalid literal)bunUpdateLockwritesbun.lockto workspace rootbunFrozenLockfile = true+ stale lockfile → install fails🤖 Generated with Claude Code