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

Should build_runner create files as readonly? #289

Closed
natebosch opened this issue May 15, 2017 · 2 comments
Closed

Should build_runner create files as readonly? #289

natebosch opened this issue May 15, 2017 · 2 comments
Labels
P3 A lower priority bug or feature request package:build_runner type-enhancement A request for a change that isn't a bug

Comments

@natebosch
Copy link
Member

Most generated files should be updated only by rerunning the builder - we could help prevent accidentally editing these files by setting the files as readonly.

Some potential complications:

  1. It's possible some folks write a Builder to 'bootstrap' a files, but not to maintain it. We don't really target this use case though.
  2. If a file is readonly for some other reason we probably wouldn't want to overwrite it. The existing warning about deleting current files could be extended to handle this case, and if it's in the stored asset graph we should be safe in deleting it.
@natebosch natebosch added P3 A lower priority bug or feature request package:build_runner type-enhancement A request for a change that isn't a bug labels May 15, 2017
@jakemac53
Copy link
Contributor

As far as I know we can't do this using dart:io anyways - technically we could run chmod or something but it doesn't seem worth the effort.

@natebosch
Copy link
Member Author

😢
dart-lang/sdk#15078

Since that issue has been open for a while I don't anticipate it getting traction anytime soon. Not much use keeping this issue open.

oh well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 A lower priority bug or feature request package:build_runner type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants