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

Fish not completing make targets anymore #7535

Closed
Erwyn opened this issue Dec 7, 2020 · 5 comments
Closed

Fish not completing make targets anymore #7535

Erwyn opened this issue Dec 7, 2020 · 5 comments
Labels
bug Something that's not working as intended completions
Milestone

Comments

@Erwyn
Copy link

Erwyn commented Dec 7, 2020

fish --version: fish, version 3.1.2
Linux 5.9.11-200.fc33.x86_64 #1 SMP Tue Nov 24 18:18:01 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
xterm-256color
Please tell us if you tried fish without third-party customizations by executing this command and whether it affected the behavior you are reporting: same behaviour

Since I upgraded to Fedora 33 I do not have completion of make targets anymore, although completion generally works. I've started troubleshooting following Zanchey directives on IRC, here is the output of the magic lines for make completion and the output looks generally ok:

~/C/tuleap ❯❯❯ make $makeflags -pRrq : 2>/dev/null | awk -F: '/^# Files/,/^# Finished Make data base/ {                 if ($1 == "# Not a target") skip = 1;
                               if ($1 !~ "^[#.\t]") { if (!skip) print $1; skip=0 }
               }' 2>/dev/null
 
 
 
tests_db_73
 
tests_soap_73
 
 
npm-build
 
rnc2rng
 
start
 
phpunit-docker-73
 
composer
 
restart-services
 
eslint-fix
 
start-gerrit
 
src/common/xml/resources/project/project.rng
 
post-checkout-reload-env
 
 
 
deploy-githooks
 
 
 
phpcbf
 
 
run-as-owner
 
rnc2rng-docker
 
 
start-all
 
generate-mo
 
 
phpunit-docker-74
 
 
 
psalm
 
plugins/tracker/resources/artifacts.rng
 
redeploy-nginx
 
plugins/docman/resources/docman.rng
 
src/common/xml/resources/ugroups.rng
 
start-mailhog
 
 
generate-templates-docker
 
 
 
start-distlp
 
psalm-baseline-update
 
 
phpunit-ci-run
 
start-gitlab
 
start-ldap-admin
 
tests-db
 
 
dev-forgeupgrade
 
generate-po
 
 
dev-clear-cache
 
phpunit-ci-74
 
start-redis
 
tests-unit-php
 
load-mariadb
 
eslint
 
 
start-jenkins
 
psalm-with-info
 
phpcs
 
generate-templates-plugins
 
plugins/tracker/resources/tracker.rng
 
stop-distlp
 
psalm-taint-analysis
 
post-checkout-build
 
help
 
 
bash-web
 
generate-templates
 
deptrac
 
switch-to-mysql57
 
show-passwords
 
plugins/tracker/resources/trackers.rng
 
tests_cypress
 
phpunit-ci-73
 
tests_rest_php73
 
tests_cypress_dev
 
tests_cypress_distlp
 
start-php73-centos7
 
 
psalm-baseline-create-from-scratch
 
 
show-ips
 
 
phpunit
 
 
plugins/svn/resources/svn.rng
 
tests-rest
 
 
tests_rest_setup_73
 
 
clean-rng
 
 
post-checkout
 
show-gerrit-ssh-pub-key
 
 
dev-setup
 
 
deploy-mailhog-conf
 
tests-soap
 
 
 
 
 
~/C/tuleap ❯❯❯ 
@faho
Copy link
Member

faho commented Dec 7, 2020

What @zanchey gave you was what it does in master. There have been changes since 3.1.2, in particular we no longer try to second guess makes file detection.

The code in 3.1.2 was:

set -lx LC_ALL C

if test -z "$directory"
    set directory '.'
end

if test -z "$file"
    for standard_file in $directory/{GNUmakefile,Makefile,makefile}
        if test -f $standard_file
            set file $standard_file
            break
        end
    end
end

set -l bsd_make
if make --version 2>/dev/null | string match -q 'GNU*'
    set bsd_make 0
else
    set bsd_make 1
end

if test "$bsd_make" = 0
    # https://stackoverflow.com/a/26339924
    make -C "$directory" -f "$file" -pRrq : 2>/dev/null | awk -v RS= -F: '/^# Files/,/^# Finished Make data base/ {if ($1 !~ "^[#.]") {print $1}}' 2>/dev/null
else
    make -C "$directory" -f "$file" -d g1 -rn >/dev/null 2>| awk -F, '/^#\*\*\* Input graph:/,/^$/ {if ($1 !~ "^#... ") {gsub(/# /,"",$1); print $1}}' 2>/dev/null
end

if you run that (note: it'll override your $LC_ALL if run like that, just erase it after or restart fish) I'm willing to bet $directory and/or $file will be set to something nonsensical, causing the make call to fail.

If it is that, this is fixed by 79566bc (and e49b4df)

@Erwyn
Copy link
Author

Erwyn commented Dec 7, 2020

Oh, ok.

The last release was 3.1.2 in April, is there a new release planned or should I install from source ?

@faho
Copy link
Member

faho commented Dec 7, 2020

A new release will happen When It's Done (tm).

In this case you can probably just download that file and save it as ~/.config/fish/completions/make.fish

@faho faho closed this as completed Dec 7, 2020
@faho faho added bug Something that's not working as intended completions labels Dec 7, 2020
@faho faho added this to the fish 3.2.0 milestone Dec 7, 2020
@zanchey
Copy link
Member

zanchey commented Dec 8, 2020

D'oh! I searched the issues but not the commit log.

@Erwyn
Copy link
Author

Erwyn commented Dec 8, 2020 via email

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended completions
Projects
None yet
Development

No branches or pull requests

3 participants