Skip to content

Remove unsupported directory syntax from pubspec shaders section - #13974

Merged
jesskuras merged 3 commits into
flutter:mainfrom
jesskuras:pubspec-shaders-files
Oct 13, 2026
Merged

jesskuras merged 3 commits into
flutter:mainfrom
jesskuras:pubspec-shaders-files

Conversation

@jesskuras

Copy link
Copy Markdown
Contributor

Description of what this PR is changing or adding, and why:

Updates the shaders field section on the Flutter pubspec options page (/tools/pubspec#shaders):

  • Removes the path_to_directory syntax and directory example, clarifying that each .frag shader file must be listed individually (since flutter_tools only parses individual file paths under flutter.shaders).
  • Removes the suggestion to add shaders under the assets field (since flutter_tools requires .frag shaders to be declared under shaders to compile them with impellerc).
  • Notes support for platforms alongside flavors and transformers, and links to the Writing and using fragment shaders guide.

Issues fixed by this PR (if any):

Fixes #13972

PRs or commits this PR depends on (if any):

None

Presubmit checklist

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • This PR follows the Google Developer Documentation Style Guidelines—for example, it doesn't use i.e. or e.g., and it avoids I and we (first-person pronouns).
  • This PR uses semantic line breaks
    of 80 characters or fewer.

@flutter-website-bot

flutter-website-bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Staged preview of the updated docs.flutter.dev site (updated for commit ece52d3):

https://flutter-docs-prod--docs-pr13974-pubspec-shaders-files-m2cueur6.web.app

@jesskuras
jesskuras marked this pull request as ready for review October 12, 2026 18:09
@jesskuras
jesskuras requested review from a team and sfshaza2 as code owners October 12, 2026 18:09

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the documentation for the shaders field in pubspec.yaml to clarify that only individual file paths are supported and that shaders should not be listed under the assets field. The review feedback correctly points out that shaders only support flavors and do not support platforms or transformers, suggesting a correction to the text.

Comment thread sites/docs/src/content/tools/pubspec.md
@jesskuras
jesskuras requested a review from parlough October 12, 2026 18:15

@parlough parlough left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this and the nearby clean up. Looks good to me!

@jesskuras
jesskuras merged commit 7f0639e into flutter:main Oct 13, 2026
14 checks passed
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.

pubspec documentation incorrectly states that flutter.shaders supports directories

3 participants