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

How to handle manual edits to generated files? #61

Closed
jakemac53 opened this issue Mar 1, 2016 · 6 comments
Closed

How to handle manual edits to generated files? #61

jakemac53 opened this issue Mar 1, 2016 · 6 comments
Labels
P3 A lower priority bug or feature request package:build_runner type-question A question about expected behavior or functionality

Comments

@jakemac53
Copy link
Contributor

Today we only handle deletes (by regenerating the file), but if you modify them we ignore it. This is because we don't have a way of detecting edits currently, the same modified timestamp logic as regular inputs doesn't work since it is always newer than the asset graph.

It is also unclear what should even be done in this case?

@jakemac53 jakemac53 added package:build_runner type-question A question about expected behavior or functionality P3 A lower priority bug or feature request S3 low labels Jan 30, 2017
@matanlurey
Copy link
Contributor

For AngularDart, this is really interesting, because it could (potentially, with other changes to make build_runner or similar a more full-featured system) let us experiment with making small changes to a generated file, but then re-running tests or benchmarks.

@jakemac53
Copy link
Contributor Author

So you actually would prefer it to be left alone then potentially?

@matanlurey
Copy link
Contributor

Maybe a flag? i.e. --retain-user-edits

@jakemac53
Copy link
Contributor Author

I guess today you could actually get what you want by just making the edit and then not changing any file which would cause that file to be regenerated.

I definitely do not want to get in a situation where we are trying to re-apply user edits to generated files, and not re-generating them based on changes also seems like a bad idea.

@matanlurey
Copy link
Contributor

Should we close this @jakemac53? I imagine editing the file as is works fine for now.

@jakemac53
Copy link
Contributor Author

jakemac53 commented Dec 24, 2017 via email

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-question A question about expected behavior or functionality
Projects
None yet
Development

No branches or pull requests

2 participants