Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use hyphens instead of underscores #1230

Closed
reznikmm opened this issue Oct 26, 2022 · 9 comments · Fixed by #1249
Closed

use hyphens instead of underscores #1230

reznikmm opened this issue Oct 26, 2022 · 9 comments · Fixed by #1249
Labels
type: bug Something isn't working

Comments

@reznikmm
Copy link
Contributor

I think USAGE output should be changed. See:

$ alr action --help
SUMMARY
   List or manually trigger action hooks

USAGE
   alr action [options] [post_fetch|pre_build|post_build|test]

$ alr action post_fetch
error: TOML keys should use hyphens instead of underscores, but found key: post_fetch

This command runs fine, however:

$ alr action post-fetch
@mosteo mosteo added the type: bug Something isn't working label Oct 27, 2022
@mosteo
Copy link
Member

mosteo commented Oct 27, 2022

Right. I hate that we aren't using underscores consistently everywhere like in Ada.

@0rzech
Copy link
Contributor

0rzech commented Nov 24, 2022

IMHO, hyphens are more comfortable in CLI and are more prevalent. YMMV, of course. 😉

@Joebeazelman
Copy link

Joebeazelman commented Aug 22, 2024

Alire incorrectly reports "TOML Keys should use hyphens" error if you accidentally leave off the table tag, for instance, configuration.values:

[configuration.values]
my_hal.Use_Startup = false
my_hal.Interrupts="bb_runtimes"

Spent too much time tracking this issue. The error should be something like "unknown key, are you missing a table tag? If not, keys at the root level cannot contain underscores."

@Fabien-Chouteau
Copy link
Member

The code you provided gives me:

error: Unknown configuration variable 'my_hal.interrupts'

Can you provide a full reproducer?

@Joebeazelman
Copy link

Do you need the toml file? Also what version are you running?

@Fabien-Chouteau
Copy link
Member

Do you need the toml file?

Yes please, and all the files necessary to reproduce the error.

Also what version are you running?

What matters here is the version you are running.

@Joebeazelman
Copy link

I'm running version 2.0.1. In the code snippet below, note the table name has been commented out. When I run alr build in the workspace, I get the following error:

error: Cannot continue without a workspace:
error:    Loading release from manifest: alire.toml:
error:    Failed to load alire.toml:
error:    Loading release from manifest: alire.toml:
error:    TOML keys should use hyphens instead of underscores, but found key: rp2040_hal

Toml file

name = "rp_pico_2040"
description = "RP2040 g-coder"
version = "0.1.0-dev"

authors = ["Joe Beazelman"]
maintainers = ["Joe Beazelman <joebeazelman@gmail.com>"]
maintainers-logins = ["joebeazelman"]

executables = ["rp_pico_2040"]

#[configuration.values]
rp2040_hal.Use_Startup = false
rp2040_hal.Interrupts="bb_runtimes"

[[depends-on]]
pico_bsp = "^2.0.0"

[[pins]]
pico_bsp = { path='../../deps/pico_bsp' }
usb_embedded = { path='../../deps/usb_embedded' }
rp2040_hal = { path='../../deps/rp2040_hal' }

@JeremyGrosser
Copy link
Contributor

#[configuration.values]
I don't think that's supposed to be commented out. Remove the #

@mosteo
Copy link
Member

mosteo commented Aug 24, 2024

@Joebeazelman, could you please open a new issue to track this separately?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants