-
Notifications
You must be signed in to change notification settings - Fork 289
Open
Labels
tooling 🔨Internal usethis toolingInternal usethis tooling
Milestone
Description
use_air()
modifies a settings.json
file using jsonlite, but #2109 (comment) let us know that jsonlite will fail to parse JSONC (json with comments), and settings.json
is a JSONC file.
This is fairly annoying because it is somewhat common to put comments in a file type like this.
I'm not sure what the right thing for use_air()
is. Ideally we'd have a parser that supports JSONC, but in the meantime...?
Maybe we'd:
- Create
settings.json
andextensions.json
if they don't exist, and dump in the template containing what we know we want to put there - Open
settings.json
orextensions.json
if they do exist, and output stuff in the console telling the user what they should add to those files (since we can't reliably do that for them). Opening the file at least makes it slightly harder to miss that you are supposed to do something here, but it is still less optimal than just modifying it for the user. - OR we could take a hammer to an existing
settings.json
orextensions.json
and overwrite it completely with our template for air settings, relying on the user to use git diffs to work backwards from there and re-add anything we removed (merging with the new air settings). This is what we do for github actions workflows, but does feel kind of aggressive here
It's worth giving this some thought because we are likely going to have other helpers that touch settings.json
as time goes on and more people use Positron (See #2111 too)
Metadata
Metadata
Assignees
Labels
tooling 🔨Internal usethis toolingInternal usethis tooling