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

Scaffold a comment in the PROJECT file to let users know that they should not update it #2786

Closed
camilamacedo86 opened this issue Jul 1, 2022 · 4 comments
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@camilamacedo86
Copy link
Member

camilamacedo86 commented Jul 1, 2022

What do you want to happen?

I'd like to see in the PROJECT file something like:

# Code generated by tool. DO NOT EDIT.
# This file is used to track the info used to scaffold your project
# and allow the plugins properly work.

So that, we could make clear that users should not change it. Motivation: #2634

PS.: Note that if we go into the store.go and try to add the comment when the file is created the following error will be faced when we try to parse / unmarshal it:

Error: unable to load the configuration: unable to determine config version: error converting YAML to JSON: yaml: line 18: mapping values are not allowed in this context

In this way, we need to see if new versions of the libs to work with YAML used can deal with comments or check if we can provide an alternative solution.

Extra Labels

No response

@camilamacedo86 camilamacedo86 added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 1, 2022
@laxmikantbpandhare
Copy link
Member

/assign

@camilamacedo86
Copy link
Member Author

From the KB meeting: Maybe would be better something like "# Code generated by tool. DO NOT EDIT IF YOU DO NOT KNOW WHAT YOU ARE DOING" OR AT YOUR RISK.

@camilamacedo86 camilamacedo86 added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Sep 11, 2022
@jason1028kr
Copy link
Contributor

jason1028kr commented Dec 26, 2022

Hi, @camilamacedo86 and @laxmikantbpandhare.
I've tried adding simple prepend on yaml pkg's Save() function for this.

But I can't seem to observe the same unable to load the configuration error(unit tests+manual 'init,' 'create api' calls), so I've made a pr(#3137) for now.

Let me know if you've planned a different approach, or I've missed something.

@camilamacedo86
Copy link
Member Author

Hi @jason1028kr,

We can close this one as done. Thank you for your contribution !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants