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

fud2 silently fails with errors #2348

Open
rachitnigam opened this issue Nov 12, 2024 · 0 comments
Open

fud2 silently fails with errors #2348

rachitnigam opened this issue Nov 12, 2024 · 0 comments

Comments

@rachitnigam
Copy link
Contributor

When adding a new stage, fud2 will silently fail when there is a problem. For example, I am adding a new Dahlia stage and when the key is absent, instead of giving an error, fud2 generates an incorrect script:

import "calyx" as c;

export const dahlia = state("dahlia", ["fuse"]);

defop dahlia_to_calyx(prog: dahlia) >> out: c::calyx_state {
    let dahlia = config_or("dahlia.exec", "dahlia");
    let flags = config_or("dahlia.flags", "");

    shell(`${dahlia} ${flags} ${prog} > ${out}`);
}

With the command:

fud2 tests/frontend/dahlia/binop_tree.fuse --to calyx -m emit

Will generate:

build-tool = /Users/rachitnigam/.cargo/bin/fud2
rule get-rsrc
  command = $build-tool get-rsrc $out

# dahlia_setup (plugin)
Failed to load plugin: dahlia-to-calyx.rhai
  Emitter error: missing required config key: dahlia

# build targets
build _to_stdout_calyx.futil: dahlia-to-calyx tests/frontend/dahlia/binop_tree.fuse

default _to_stdout_calyx.futil

This should be considered a blocking usability issue for the fud2 transition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant