-
Notifications
You must be signed in to change notification settings - Fork 229
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
Bump version of pubspec #2197
Comments
Anything that mutates the (A) has significant downsides as it's common to comment out If anyone is interested in taking on (B) writing an abstract syntax tree for YAML and support mutating it that would make adding this feature very easy. |
Or C we only parse out version key rather then fully implementing whole YAML implementation 😛 |
Parsing out the version key is harder than you would think - yaml has like a billion ways of doing the same thing. That being said you could use the source code information from the parsed yaml to specifically edit that node without to much headache I think. I don't know if it is really worth doing though and would be a potential source of bugs and/or race conditions. |
@jacob314 You might be right, I might just going with sed command in my script. I know its no trivial task to implement full yaml spec in dart. Thx |
@JasCodes, so @sigurdm suggested it might be possible by forking dart-lang/yaml, extending the scanner to emit comments for which there is currently no token type. Then it might be possible to write something that mutates the token stream and rebuild a YAML string from the token stream. |
Check out the package cider on pub.dev (not mine). The
Here are a few sample commands:
|
Note this has a WIP PR: #2617 . Not sure when we'll get back to that... |
@sigurdm, If you want the |
@Levi-Lesches I have no objection to merging any part of Cider code into pub, but regex does indeed seem too hacky for an official tool. |
Yeah - especially now that we have made the actual yaml-edit tool. |
Cli should allow to bump version major, minor build
Thx
The text was updated successfully, but these errors were encountered: