Repository navigation
Conversation
…resolves it --checkup wrote each hub import into a temporary root (import <path> as Hub) and loads that, so name lookup, fetching, hash checks and library confinement are the loader's own; the module keeps its hub namespace and its main becomes the root's main. A first parse with Base marked seen finds the module's file to see whether it imports Base, so Base is seeded as for local imports. The entry parameter through io_type, io_run, js_lib, book_main and book_run and the ns parameter of book_read go: comp.ts is unchanged, main.ts is +246 tokens over main instead of +608.
Collaborator
I pushed 67d6f8e on top of this PR. It keeps the behavior and lets the loader do all of the resolving:
Checks on macOS:
I left the README line and the ping test unchanged. |
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.
Fixes #1499.
--checkupcurrently turns a documented content-hash or named hub import into a file beside the aggregation. The ordinary checker/runner resolves the same cached package and returns5n; independent checkup instead fails with ENOENT.Resolve package names using the existing public name/version grammar, name-cache layout and immutable hash lookup protocol. Hand acquisition and manifest/file digest verification to the unchanged loader. Keep the module's hub namespace while parsing/checking, then select its actual pure or IO
main; the shared JS generator now accepts an explicit entry root rather than only rootingmain. Ordinary CLI, JS and module entry defaults remain unchanged. Reuse checked Base when source is already present, but do not inject Base into a module that did not import it. Cache confinement is checked before executing an entry.The permanent installed-CLI consumer uses the gate's existing manifest hash helper to create a valid isolated cache: one content-hash pure entry returns
5n, and a different named effectful entry actually printshub-io. The exact new assertion fails against unchanged main and passes against the genuinely rebuilt standalone CLI. No wiring/source-shape/diagnostic-text assertion. README documents independent hub scope.Actual Linux x64 evidence:
5n; named imports resolve and executehub-io. This is local HTTP protocol proof, not a claim that a test package was published to the public hub.bun gates/repo.ts: 54/54.The human-written bend2/bend.ts, GUIDE, CHANGELOG, kernel, gate policy and permanent token limits are untouched. Full installer/archive/hub ping was not run because the sibling site checkout is unavailable; executing its new assertion is not a claim that the complete gate passed. No GPU/platform qualification.