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

Show submodule recipes in --choose #2110

Closed
casey opened this issue May 29, 2024 · 6 comments · Fixed by #2111
Closed

Show submodule recipes in --choose #2110

casey opened this issue May 29, 2024 · 6 comments · Fixed by #2111

Comments

@casey
Copy link
Owner

casey commented May 29, 2024

From this comment

@foresterre reports that submodule recipes aren't appearing in --choose

I wasn't actually able to reproduce this. Doing this:

$ cat test.just
mod foo
$ cat foo.just
bar:
$ cargo run -- --unstable --justfile test.just --choose

Showed foo::bar in my chooser.

@foresterre
Copy link

foresterre commented May 29, 2024

Reproduced this on both windows and ubuntu using: https://github.com/foresterre/sic/blob/960375b1fd37960e8cc8d4a22b1fa1ecbde32a25/justfile#L17

In this repo (branch 'avif-decoder', see commit hash above), I call just from the root of the repo with just --unstable. The result looks like this on ubuntu:

image

and on windows: #929 (comment) (see earlier) comment

Top level justfile from sic project above for reference

sic top level justfile
# NB: mod requires Just >= 1.19 and just --unstable
mod clippy  '.justfiles/clippy.just'
mod deny    '.justfiles/deny.just'
mod fmt     '.justfiles/fmt.just'
mod msrv    '.justfiles/msrv.just'
mod test    '.justfiles/test.just'
mod dav1d   '.justfiles/dav1d.just'

[windows]
default:
    @echo 'On Windows, run just using:'
    @echo 'just --unstable --shell pwsh.exe --shell-arg -c'
    @just --choose --unstable

[unix]
default:
    @just --choose --unstable

before-push:
    # do fmt
    just --unstable fmt
    # run checks
    just --unstable fmt check
    just --unstable dav1d
    just --unstable clippy
    just --unstable test
    just --unstable msrv
    just --unstable deny

Haven't tried latest version from git yet;

I used (ubuntu, installed via cargo install just):

> just --version
just 1.25.0

@foresterre
Copy link

foresterre commented May 29, 2024

Installed latest release on ubuntu with cargo install just (1.27.0), this solves the issue indeed. My apologies:

image

However, it does appear that the chooser has a different issue, namely, showing the recipe content:

image

This is the case for all recipes which are from the modules. I can select and run them via the chooser just fine, despite it stating that the recipe is unknown.

Do you want a new issue on github for this (so the reference to the issue from which this one was split stays intact) ?

@foresterre
Copy link

foresterre commented May 29, 2024

For completeness sake, and since I was installing just from source anyways and this was hardly any extra effort, I also tested this last one also with the latest git 77a6e02, where this last issue is still present:

image

i.e. cargo install just --git https://github.com/casey/just.git --rev 77a6e02964f2f7607bd5f6163de5df5a1c13661d

@casey
Copy link
Owner Author

casey commented May 30, 2024

Nice, glad it works! I just merged #2111, which makes --show take a recipe path, so recipe preview when choosing should work now.

@casey
Copy link
Owner Author

casey commented Jun 8, 2024

This is still broken. Recipes are printed out with space-separated paths, but passed as a single argument to the --show preview command, which --show doesn't handle.

@casey casey reopened this Jun 8, 2024
@casey
Copy link
Owner Author

casey commented Jun 9, 2024

Fixed, hopefully this time for good, in #2141.

@casey casey closed this as completed Jun 9, 2024
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.

2 participants