Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Unmarshal settings to known struct instead of using a Viper singleton #1355

Copy link
Copy link
Open
@silvanocerza

Description

@silvanocerza
Issue body actions

Enhancement

Currently the CLI uses a *viper.Viper singleton in the github.com/arduino/arduino-cli/configuration package to store all the configs, no validation is done when reading the config file but only when editing the config with the config command.

A great enhancement would be to unmarshal the config file using Viper to a known struct, this way we won't have a viper.Viper singleton since it causes some problems and makes it hard to embed certain parts of the CLI, also it will be easier to validate the data read from the config file. Probably it will also enhance writing to file but am not sure. 🤔

This has been inspired by this Fosdem 2019 talk by @carolynvs: https://youtu.be/l89Z0RYseFs?t=1009

Metadata

Metadata

Assignees

Labels

criticality: lowOf low impactOf low impactpriority: mediumResolution is a medium priorityResolution is a medium prioritytopic: CLIRelated to the command line interfaceRelated to the command line interfacetopic: codeRelated to content of the project itselfRelated to content of the project itselftype: enhancementProposed improvementProposed improvement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.