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

Warn/error when alias have invalid characters #761

Closed
samoht opened this issue May 9, 2018 · 2 comments · Fixed by ocaml/opam-repository#12323
Closed

Warn/error when alias have invalid characters #761

samoht opened this issue May 9, 2018 · 2 comments · Fixed by ocaml/opam-repository#12323

Comments

@samoht
Copy link
Member

samoht commented May 9, 2018

For instance, something like this will make dune explodes:

(alias
 ((name foo/bar)
  (action (echo toto))))

(alias
 ((name bar)
  (action (echo toto))))
$ jbuilder build  --root . @bar
File "src/build_system.ml", line 226, characters 4-10: Assertion failed
Backtrace:
Raised at file "src/build_system.ml", line 226, characters 4-43
Called from file "src/gen_rules.ml", line 913, characters 16-49
Called from file "src/gen_rules.ml", line 963, characters 8-37
Called from file "src/stdune/list.ml", line 13, characters 10-13
Called from file "src/gen_rules.ml", line 954, characters 4-773
Called from file "src/gen_rules.ml", line 993, characters 19-30
Called from file "src/build_system.ml", line 860, characters 6-62
Called from file "src/build_system.ml", line 836, characters 6-59
Re-raised at file "src/build_system.ml", line 847, characters 6-17
Called from file "src/build_system.ml" (inlined), line 804, characters 32-63
Called from file "src/build_system.ml", line 814, characters 4-24
Called from file "src/build_interpret.ml", line 101, characters 24-40
Called from file "src/build_interpret.ml", line 60, characters 31-43
Called from file "src/build_interpret.ml", line 60, characters 31-43
Called from file "src/build_system.ml", line 1184, characters 10-108
Called from file "src/fiber/fiber.ml", line 359, characters 6-13

And

$ jbuilder build  --root . @foo/bar
From the command line:
Error: Don't know about directory foo!
@samoht
Copy link
Member Author

samoht commented May 9, 2018

(note: allowing / in alias name could be a useful feature too)

@ghost ghost mentioned this issue May 9, 2018
@ghost
Copy link

ghost commented May 9, 2018

That's not possible: aliases are per-directory

@ghost ghost closed this as completed in #762 May 10, 2018
ghost pushed a commit that referenced this issue May 10, 2018
ghost pushed a commit that referenced this issue May 10, 2018
This issue was closed.
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

Successfully merging a pull request may close this issue.

1 participant