dart-lang / dart-lang/language

How do we expect tools to handle import shorthands?

Open
#1,940 9 comments 1 reaction 0 assignees View on GitHub
brevity import-shorthand unquoted-uris
Dominant language
TeX
Stars
2.9k
Forks
239
Avg merge
2d 18h
Merged PRs (30d)
14

Description

@bwilkerson raised some concerns about the tooling experience for import shorthands. If we implement this proposal, there will now be essentially four (or more) different ways to write an import/export.

How do we expect tools to deal with this? Will we be deprecating the old syntax? Presumably not, since it is more general. If not, is this a configuration knob? "Add imports using ...."? Or do the tools try to guess based on existing uses? What if it's invalid to use the predominant syntax?

In general, are there usability issues we need to consider here?

cc @lrhn @munificent @eernstg @natebosch @jakemac53 @bwilkerson

Contributor guide

Open the contributing guide

Research direction

Start with the discussion in issue #1940 and review the import-shorthand proposal it references. Identify the expected behavior for tools, including syntax compatibility, deprecation, configuration, and existing-code detection. Done means the usability questions have a documented, agreed resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
compilers, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.