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
Modules stabilization tracking issue #929
Comments
Hi @casey, curious if this project is inspired to any extent by mmake? For me, the most painful thing that traditional make lacks is support for remote includes. For example, we have built out a set of common makefiles at my job for common projects (e.g. ExpressJS/Node apps, Spring Boot apps, AWS Lambda with SAM CLI, etc.). We also have a core makefile that exports handy commands to print messages in certain colors, require certain environment variables, etc. The most annoying part of this setup is that we have to ask people to copy/paste files into their repos. We even have an I just wanted to throw this out there. I know there is a lot of thought being put into a module system in general, but allowing for remote modules would be awesome. Thanks for all the hard work on a really cool tool :) |
I didn't know about
That's a super interesting feature. We don't have modules, but if we ever do, I wouldn't be opposed to adding something like that.
Interesting, that does seem very useful.
Feel free to open an issue about remote modules, why they're cool, how you use them. It's something that won't get implemented for a long time, but having an issue for it would probably be good.
You are most welcome! It is good to be of service 🙌 |
Found this issue also hoping it was talking about remote includes. We currently use make, and rely heavily on a centralized makefile. It's distributed using an include line that uses a shell command to invoke curl:
Works pretty well, but some of the frustrations around |
I would also jump in with support for remote modules. One of the hardest things about working with cloud infrastructure and deploying applications is the need for sharing and reusing. Wanting to reuse all these great just commands I've written in one repository are not easily transferred to another repository. I feel like deno has solved this problem (URL imports, versioned, immutable repos), and aim to write all my future cloud related coordination and scripting. But it doesn't get around not being able to re-use just commands where I really want them. I think this tool really appeals to those who pipeline software. |
I'd love to have something analogous to url imports in dhall for importing modules in Fetching from private repos is probably a more important feature and requires some though in the general case, for github nothing special is required as one can just put the personal access token in the url. Importing from public repo:
Importing from private repo
where |
Thanks a lot for the new module system in v1.19.0 🔥 It'd be amazing to have the following feature (you already envisioned) in subsequent releases:
This is since I'd like to have one Here is the way I achieved this behavior so far. |
@casey Wow, that was quick! Very greateful ❤ |
Thank you @casey for hanging in there on the import and module features! |
Nice, this looks like it could be an elegant replacement for justfile recipes such as
the purpose of which is to run But in testing out replacing this recipe with
This behavior means that justfiles with recipes that do |
Hey @casey, thank you so much for just and for this update, quick question, do you plan, or maybe it's already possible and i've missed it to include modules from git repos, like @stereobutter initially mentioned, i would love that. |
@WladyX Do you mean including modules from a local git repo, or a remote git repo? |
Yes, exactly. |
@WladyX Sorry, to be clear, do you want to load modules from a file in a local git repo, e.g., one that's on the same computer that just is running on, or a remote repo, like one on GitHub? |
no worries Casey!
ideally i want to be able to make templates and by using variables to adapt them to each repo. does that make sense? |
I created #1799 to discuss remote imports. |
I'm finding it to be off putting that the functions Edit: I missed #929 (comment) already talking about this but just wanted to echo that is it causing me some grief as well. |
Should an alias in a parent accept the names of recipes in modules? I am not sure if this might work in a future version of just, or whether it is not expected to be supported. I am currently doing this in a parent justfile to enable top-level aliases to delegate to recipes in modules: mod pre-commit
# Run all checks
lint:
@just pre-commit::check Ideally, I would like to do something like this: alias lint := pre-commit::check |
Recipes run external commands, so you likely have a binary called The way you've settled on (calling I expect that eventually it will be possible to call module recipes as dependencies like you tried to. |
Ah of course! Too much tunnel vision I imagine, after I couldn't get the previous solutions to work.
I think that would be incredibly useful. But even more so to be able to mark a recipe from a module as being dependent on another. |
This issue tracks stabilization of
mod
statements.There are a bunch of features which aren't yet implemented, but I think they can all be implemented in a backwards compatible fashion:
module()
andmodule_directory()
functions.env
filesI want the feature to be well used and well tested before stabilizing it.
The text was updated successfully, but these errors were encountered: