Repository navigation
@shared/ imports render: both bundlers resolve the workspace's shared/ (LY2) - #186
Merged
Merged
Conversation
…/ (LY2) raea's skill tells agents to import shared code as @shared/components/NAME, and the project's tsconfig maps it, so tsc passes; but raea render's bundler took @shared/... for a package and the composition threw "Can't find variable: _shared_components_badge" before its first frame (0.1.7, reported by an agent on macOS). A relative import of the same file worked. raea_io_home::shared finds the workspace's shared/ as the engine's loader does (the folder holding .raea/workspace; its root for a workspace from before shared/) and the file an @shared/ name means. runtime/bundle's copy of an edit treats @shared/ like any import from outside its folder: copied to ext/shared/ with what it imports, the import pointed at the copy (a project that is its own repo too). engine/bundle's script resolution (raea run, specs) resolves it from the importer. A name shared/ doesn't have is refused naming its importer, not left to the bundler. Checked: raea render of a composition importing @shared/components/badge draws (it threw before); raea run resolves @shared/; a missing name is refused with the file it looked for. raea-io-home, raea-runtime-bundle and raea-bundle tests pass (new: an_import_of_shared_finds_the_workspace_s_file_from_any_depth, outside_copies_the_workspace_s_shared_code).
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.
raea's skill tells agents to import shared code as
@shared/components/NAME, and the project's tsconfig maps it, so tsc passes. Butraea render's bundler took@shared/...for a package, and the composition threwCan't find variable: _shared_components_badgebefore its first frame (0.1.7, found by an agent on macOS). A relative import of the same file worked.raea_io_home::sharedfinds the workspace's shared/ the way the engine's loader does: the folder holding .raea/workspace, or that folder's root for a workspace from before shared/. It also finds the file an@shared/name means, andimport()answers both relative and@shared/imports.@shared/like any import from outside the edit's folder. The file is copied to ext/shared/ with what it imports, and the import is pointed at the copy. This also covers a project that is a repo of its own.raea run, specs) resolves@shared/from the importer.import_pathmoved to raea-io-home with the other path helpers, which keeps raea-runtime-bundle under the 2000-line cap.Checked
raea renderof a composition importing@shared/components/badgedraws (it threw before).raea runresolves@shared/.🤖 Generated with Claude Code