Repository navigation
remove named imports - #122
Merged
Merged
Conversation
alii
force-pushed
the
no-named-imports
branch
from
September 24, 2026 00:40
cd1f422 to
5228c39
Compare
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.
Named imports are gone.
import scarlet/list.{fold}no longer parses. There is one way to import a module, and you name what you use through it:Parser. A
.{..}after an import is one error that says what to write:Import the module and name it at the use: `import scarlet/list`, then `list.fold`. The parser then skips the list and keeps the import, so there's no cascade after it.Removed with it:
ImportDeclaration::items, and the formatter's rendering of it.ReferenceKind::ImportItem, and thealias_ofchain that made{X as Y}its own rename class.import_itemsrule.ValueRef::Slot,Load::Slotinscarlet_ir, andFrameSlot.resolve_variablenow saysPlace::ThisFunctionfor a name the function binds, rather than handing out a slot the elaborator never uses.Migrated:
.scrlin the repo: the stdlib, the examples, andtests/programs.scarlet check.examples/modules.scrlnow showsason a module, since it used to show item aliases.Tests:
lib.Color)env_rollback.rs, so there are 43 test executables now, and the project notes say so)as.docs/visibility.mdno longer lists selective import as a place visibility is checked. The changeset ismajor.All seven CI gates pass locally. hawk ran for the host target, and nothing here is gated on a cfg.
bun run corpusfailed at first because of a merged branch's worktree left inside the repo. I removed it, and then corpus passed.