feat: Enable cli flags#312
Conversation
| nextSettings, | ||
| vscode.ConfigurationTarget.Global, | ||
| ); | ||
| } |
There was a problem hiding this comment.
I'm open to other opinions here but I strongly dislike pressing a button in the tree view writing a bunch of stuff to my config. ensureCachedTargetDeploySettings is probably the worse offender since it can write a lot potentially.
There was a problem hiding this comment.
I can think of one way, where we just leave it empty when the target doesn't have any custom deploy settings. However, I feel like that makes it more confusing for the users to add custom settings. When they start topo for the first time, they won't have any example json object that resembles the deploy options. Can you think of any other way?
There was a problem hiding this comment.
Along with above, we can also make a command palette+quick pick path to add a custom deploy options. It would be shown/editable by the settings page, but if we have another way to edit the deploy settings(command palette + quick pick), it would be a good way to guide the user even when there are no example deploy option object in the settings?
| Object.entries(settings).filter(([, value]) => | ||
| isTargetDeploySettings(value), | ||
| ), |
There was a problem hiding this comment.
Behavioural question I don't have strong opinions about - should we throwing away all the config if one value is invalid. i.e. if set noRecreate: "foo" we'll discard my custom port atm
There was a problem hiding this comment.
what do you mean by "discard"? are we not deploying at all or deploying with no flags? I think it should either be not deployed or deployed with flags. I don't think we should deploy with no flags for flags being invalid. that is weird
| } | ||
| } | ||
| }, | ||
| "topo.targetDeploySettings": { |
There was a problem hiding this comment.
Should we be constraining this to deploy? We've talked in the past about other target-specific config we want to set and it would feel nasty imo to have something like
{
"topo.targetDeploySettings": {
"target": {
"port": "12345"
}
},
"topo.extensionSettings": {
"target": {
"refreshInterval": 3000
}
}
}perhaps would be neater to generify this and scope deploy settings like:
{
"topo.targetSettings": {
"target": {
"deploy": {
"port": "12345",
},
"refreshInterval": 3000 // added later if ever ofc
}
}
}| if (options.forceRecreate && options.noRecreate) { | ||
| throw new Error('Cannot use both force recreate and no recreate'); | ||
| } |
There was a problem hiding this comment.
This is currently an uncaught error as it stands which I'm not sure if what we want for a validation error?
There was a problem hiding this comment.
I'm not sure what you mean? can you rephrase the sentence?
Signed-off-by: awphi <26072111+awphi@users.noreply.github.com>
Signed-off-by: Federico Bozzini <federico.bozzini@arm.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#321) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… 8.62.1 (#320) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Federico Bozzini <federico.bozzini@arm.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Federico Bozzini <federico.bozzini@arm.com>
2bb8ac0 to
71c099c
Compare

Changes
Screenshots
Confirmed with @ZachMaso on the UI.