ongardie / cubicle

Manage isolated development environments
MIT License
15 stars 3 forks source link

package.toml doesn't support quoted or dotted key names. #40

Closed superfell closed 2 years ago

superfell commented 2 years ago

e.g.

[depends.debian]
"libstdc++-arm-none-eabi-newlib" = {}

gives

simon@Starbuck cubicle % cub package update qmk
Error: error scanning built-in packages in "/Users/simon/Github/cubicle/packages"

Caused by:
    0: could not read manifest for package "qmk": "/Users/simon/Github/cubicle/packages/qmk/package.toml"
    1: data did not match any variant of untagged enum DependencyOrTable for key `depends.debian` at line 1 column 1

same for

[depends.debian]
libusb-1.0-0={}

this running #38 if that makes a difference.

ongardie commented 2 years ago

I couldn't repro a failure with your first example; this seems to parse for me:

[depends.debian]
"libstdc++-arm-none-eabi-newlib" = {}

Is it possible you had more stuff elsewhere in the file that was causing the issue?

I did get that error with your second example:

[depends.debian]
libusb-1.0-0={}

which needs to be quoted like this:

[depends.debian]
"libusb-1.0-0"={}

since the dots mean something to TOML.

superfell commented 2 years ago

yeah, looks like a PBK problem, sorry.