Skip to content
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

Stdin name search #1566

Merged
merged 3 commits into from
Sep 13, 2024
Merged

Stdin name search #1566

merged 3 commits into from
Sep 13, 2024

Conversation

munificent
Copy link
Member

Use --stdin-name as a file path for inferring the language version.

If --stdin-name is given, then look for a surrounding package config to
infer the default language version from for code read from stdin. To
avoid that behavior, you can pass in a language version explicitly
using --language-version.

Fix #1530.

This was just a mistake when I added the package config tests where I
accidentally had them nested inside an unrelated group. Fixing in a
separate commit to make the new tests easier to see in the diff.

Also made a test description clearer.
If --stdin-name is given, then look for a surrounding package config to
infer the default language version from for code read from stdin. To
avoid that behavior, you can pass in a language version explicitly
using --language-version.

Fix #1530.
@munificent
Copy link
Member Author

I split this into two commits because I also needed to fix the grouping of some tests. You might want to review the commits separately to get an easier diff.

lib/src/io.dart Outdated Show resolved Hide resolved
@munificent munificent merged commit 0c1f628 into main Sep 13, 2024
7 checks passed
@munificent munificent deleted the stdin-name-search branch September 13, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a --stdin-path argument
2 participants