Skip to content

Allow import and part to have wildcard path to import every lib in specific directory #3915

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SPiercer opened this issue Jun 17, 2024 · 1 comment
Labels
feature Proposed language feature that solves one or more problems state-duplicate This issue or pull request already exists

Comments

@SPiercer
Copy link

i was messing around and had been using part of imports and my main part lib has a massive amount of parts

part 'route/a.dart';
part 'route/b.dart';
part 'route/c.dart';

i guess it would be cool if we could've simply just..

part 'routes/*';
@SPiercer SPiercer added the feature Proposed language feature that solves one or more problems label Jun 17, 2024
@lrhn
Copy link
Member

lrhn commented Jun 17, 2024

Duplicate of (at least) #1709

Same argument against: It's fragile. Even if it was part 'routes/*.dart';, it might include something you don't want.
If/when we get part files with imports and further parts, it becomes even less likely that all the files you need are the only files in a directory, and while using globs like part 'banana_concept1_*.dart';, part 'banana_concept2_*.dart'; could work, I hope your editor doesn't write a #banana_concept1_part1.part temporary file.

@lrhn lrhn added the state-duplicate This issue or pull request already exists label Jun 17, 2024
@lrhn lrhn closed this as completed Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Proposed language feature that solves one or more problems state-duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants