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

Cannot have a dependencies when using module #2316

Closed
davzucky opened this issue Aug 22, 2024 · 2 comments
Closed

Cannot have a dependencies when using module #2316

davzucky opened this issue Aug 22, 2024 · 2 comments

Comments

@davzucky
Copy link

Thank you for Just. I really love it. As my Just file is growing, I would like to break it into modules; however, I'm not able to depend on recipes from other modules.

I'm trying to reuse modules from my main justfile and add them as dependencies. The idea is something like that

# module/foo.just
a:
    @echo  "a"
# justfile
mod foo "./module/foo.just"

b: foo::a
    @echo  "b"

I tried multiple solutions, like foo::a or (foo a), but I always get an error like that. You can find multiple error outputs below.

error: Expected backtick, identifier, '(', ')', '/', or string, but found ':'
 ——▶ justfile:3:8
  │
3 │ c: (foo::a)

error: Expected '&&', comment, end of file, end of line, identifier, or '(', but found string
 ——▶ justfile:3:4
  │
3 │ c: "foo::a"
  │    ^^^^^^^^

error: Unknown start of token:
 ——▶ justfile:3:8
  │
3 │ c: (foo.a)
  │        ^

I looked at the test and couldn't see anything that matched it. Is it a known limitation of just today? The main idea is to be able to depend on parametrized module recipes.

@laniakea64
Copy link
Contributor

Is it a known limitation of just today?

Yes. This is on the list in #2252

@davzucky
Copy link
Author

Thank you, @laniakea64, for pointing that out. I didn't find this issue. I will close that one and subscribe to the main one

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

2 participants