posit-dev / publisher

MIT License
3 stars 0 forks source link

Catch TOML Validation Errors #705

Closed kgartland-rstudio closed 1 day ago

kgartland-rstudio commented 9 months ago

I wonder if we can catch some of the TOML validation errors and throw more specific errors. For example, this error is thrown if you fail to quote a string:

CLI:

can't load file '.posit/publish/default.toml': 7|
8| [environment]
9| blue = "green"
10| tennis = red
black = 19

[python]
version = '3.11.6'
package-file = 'requirements.txt'
package-manager = 'pip'

[connect.runtime]
#connection-timeout = 10
#read-timeout = 11
#init-timeout = 12
#idle-timeout = 13
#max-processes = 7
#min-processes = 2
#max-connections = 2
#load-factor = 0.4
[connect.kubernetes]
#amd-gpu-limit = 1
cpu-limit = 2
cpu-request = 0.6
memory-limit = 150000000
memory-request = 25000000
#py-environment-management = false

 |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ incomplete number.

UI: Screenshot 2023-12-20 at 12 30 24 PM

dotNomad commented 1 day ago

We believe this one has been caught in recent work.