Skip to content

✨Expansion on project.pros upload_options fields #349

@BennyBot

Description

@BennyBot

Requested Feature

Currently in project.pros, there is a field called upload_options that allows users to specify default options for the upload command that will be applied by default, unless that option is provided in the command call.

This section is also used in conjunction pros-vsc and the project.pros view to allow the sidebar upload button to have options applied to it.

I would like to expand on this section of project.pros. Essentially, we will replace

"upload_options":
 {
 "icon": "alien"
}

with

"default_options": {
    "upload": {
        "icon": "alien",
        "slot": 1,
        "extra": "--verbose --no-analytics"
    },

    "build": {
        "extra": "--verbose --no-analytics -- -j8"
    },
}

The vscode project.pros view will have a default options view for all sidebar buttons. Users who wish to add default options for non sidebar commands can open project.pros with something other than the PROS view and edit the json.

While it is possible to just go into each CLI command and add code to get the correct options from project.pros and apply them to the command call without overriding any options specified in the call (similar to how the upload options work as of now, at second glance it is kinda messy sorry ☹️),
this is very inefficient if we have to do it for every command. We should find a way to do this at the beginning.
example flow:
pros upload --slot 5 is called -> click gets the command and kwargs -> we open project.pros and match the command to the correct default options, adding those options as needed -> click then calls the command function, passing this edited kwargs instead of the original

Is this Feature Related to a Problem?

https://www.vexforum.com/t/pros-make-using-multicore-builds/124910/

Benefits of Feature

Fixes my bad code and makes it expandable for the future

Metadata

Metadata

Assignees

Labels

enhancementThis builds on top of an existing featurefeatureA brand new featureoptimizationSomething could be done betterp: normalNormal priority

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions