-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Create functions from c3c to manipulate the project.json #1311
Comments
Alright, I'm thinking of taking a look at doing this, a question though, all the commands use the |
I think it should be fairly straightforward to fit it in the build-options still. You just need to forward to a separate function that does the more complex parsing, e.g. if (arg_match("project"))
{
options->command = COMMAND_PROJECT;
parse_project_options(options);
return;
} |
Gotcha, then I'll go ahead and do it that way |
How should |
Error out, saying it is invalid and what key is invalid. |
I've been thinking of having a key "vendor" which has a completely free schema. That way IDEs and stuff can put things in there and it's just ignored by the compiler, but they can use it. |
I am looking for a good first issue and was playing with I see 2 options:
For the second option, I couldn't find any ready to use functions to convert JSONObject to string ( For |
I think it should be "read the file as json, modify, print the json". It's fine to discard the comments. When it comes to a target you want to give:
Other commands can be used to manipulate the target further. |
For vendor, maybe it should be: "vendor" : {
"com.foo.bar": ... arbitrary json ...
"com.baz.Foo": ... arbitrary json ...
} So a unique key, preferably reverse path like above, then any data inside of that. |
Yes, it's straightforward to edit the project.json, but the downside is that it's currently actually json5. Plus there is some need to consult the documentation just to do simple things, and there is no way for a beginner to really know what the parts do.
So a first feature could be something like:
c3c project view
, which looks at the project.json and prints something like:And then you could do things like
c3c project add-target <name> executable
c3c project update-target <name> set target windows-x64
Really trivial things to do, but this allows for a separate help on the project:
c3c project project help-target
which might list:As a first step, just getting
project view
done is enough.The text was updated successfully, but these errors were encountered: