Repository navigation
Conversation
projectile-tasks-from-just only read the project's justfile, so the recipes of the modules it declares with `mod' never showed up in projectile-run-task. Follow `mod' and `mod?' statements to the module source, looking where just does (NAME.just, NAME/mod.just, a justfile in NAME/, or the explicit path), and offer its recipes qualified the way just names them (just:foo::build runs `just foo::build'). Nested modules are followed too, skipping a module that loops back.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2158.
projectile-tasks-from-justonly read the project's justfile, so recipes defined in just modules never showed up inprojectile-run-task.The provider now follows
mod NAMEandmod? NAMEstatements to the module source and offers its recipes qualified the way just names them:just:foo::build, runningjust foo::build.NAME.just, thenmod.just,justfile,.justfileorJustfilein theNAMEdirectory. An explicit path (mod foo 'tools/foo.just', single or double quoted) is used as given, and searched the same way when it names a directory.just:baz::qux::run).mod?case) is skipped, and so is a module that points back at a file already being read, so a loop can't recurse forever.modstatement must end its line (an optional comment aside), so a recipe calledmodthat takes a parameter (mod target:) is still read as a recipe.Specs added to
test/projectile-tasks-test.elunderprojectile-tasks-from-just: modules (plain,mod?with a quoted path, an attribute line and a trailing comment, nestedmod.just->justfile), a missing module plus a self-referencing one, and a recipe calledmod. TheCHANGELOG.mdentry and the discovered-tasks table indoc/modules/ROOT/pages/tasks.adocare updated.Checks (Emacs 31.1,
emacs -Q --batch, buttercup/compat/consult from GNU ELPA/MELPA; Eldev itself was not used):test/projectile-tasks-test.el: on master the module spec fails (onlyjust:defaultis returned); with the change 59 specs, 0 failed.test/projectile-*-test.el: 1533 of 1553 specs ran, 0 failed (master: 1530 of 1550, 0 failed).projectile.elbyte-compiles withbyte-compile-error-on-warn;relintreports nothing;checkdocreports nothing for the new functions.eldev test/eldev compile/eldev lint, and the module lookup was not checked against a realjustbinary (it follows the just manual's module section).Before submitting a PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):
eldev test)M-x checkdocwarningsThanks!