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

Relative paths of files() are passed to a command when custom_target is used #3589

Open
evverx opened this issue May 18, 2018 · 0 comments
Open

Comments

@evverx
Copy link

evverx commented May 18, 2018

I tried to figure out why a switch from run_target to custom_target caused ctags to generate tags containing relative paths. I found #1011 where run_target had been fixed, but it seems that custom_target hasn't been changed similarly yet.

$ cat meson.build
project('test', 'c')

all_files = files('main.c')

custom_target(
	'custom',
	output : 'custom',
	command : ['echo'] + all_files)

run_target(
	'run',
	command : ['echo'] + all_files)

$ touch main.c

$ ../meson/meson.py build
The Meson build system
Version: 0.47.0.dev1
Source dir: /home/ubuntu/TEST
Build dir: /home/ubuntu/TEST/build
Build type: native build
Project name: test
Native C compiler: cc (gcc 5.4.0 "cc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Build targets in project: 2
Found ninja-1.7.2 at /usr/bin/ninja

$ ninja -C ./build/ custom
ninja: Entering directory `./build/'
[1/1] Generating custom with a custom command.
../main.c

$ ninja -C ./build/ run
ninja: Entering directory `./build/'
[0/1] Running external command run.
/home/ubuntu/TEST/build/../main.c
evverx added a commit to evverx/systemd that referenced this issue May 18, 2018
In systemd#6561, `run_target`
was changed to `custom_target`, which inadvertenly caused
relative paths to be passed to ctags due to
mesonbuild/meson#3589.
The switch to `run_target` causes absolute paths to be
passed again and makes it easier to jump from file to
file, hopefully delaying the need to exit Vim :-)
evverx added a commit to evverx/systemd that referenced this issue May 18, 2018
In systemd#6561, `run_target`
was changed to `custom_target`, which inadvertently caused
relative paths to be passed to ctags due to
mesonbuild/meson#3589.
The switch to `run_target` causes absolute paths to be
passed again and makes it easier to jump from file to
file, hopefully delaying the need to exit Vim :-)
keszybz pushed a commit to systemd/systemd that referenced this issue May 19, 2018
In #6561, `run_target`
was changed to `custom_target`, which inadvertently caused
relative paths to be passed to ctags due to
mesonbuild/meson#3589.
The switch to `run_target` causes absolute paths to be
passed again and makes it easier to jump from file to
file, hopefully delaying the need to exit Vim :-)
Yamakuzure pushed a commit to elogind/elogind that referenced this issue Aug 23, 2018
In systemd/systemd#6561, `run_target`
was changed to `custom_target`, which inadvertently caused
relative paths to be passed to ctags due to
mesonbuild/meson#3589.
The switch to `run_target` causes absolute paths to be
passed again and makes it easier to jump from file to
file, hopefully delaying the need to exit Vim :-)
Yamakuzure pushed a commit to elogind/elogind that referenced this issue Aug 24, 2018
In systemd/systemd#6561, `run_target`
was changed to `custom_target`, which inadvertently caused
relative paths to be passed to ctags due to
mesonbuild/meson#3589.
The switch to `run_target` causes absolute paths to be
passed again and makes it easier to jump from file to
file, hopefully delaying the need to exit Vim :-)
nyorain added a commit to nyorain/tokonoma that referenced this issue Nov 18, 2019
evverx added a commit to evverx/systemd that referenced this issue Jan 16, 2022
Looks like mesonbuild/meson#957 was
reintroduced in meson-0.57.0 (and looking and https://mesonbuild.com/Release-notes-for-0-57-0.html
I'm not sure whether it was intentional or not) so run_command can no
longer be used to get around
mesonbuild/meson#3589. Let's just force
ctags to always use absolute paths to fix it once and for all.
keszybz pushed a commit to systemd/systemd that referenced this issue Jan 18, 2022
Looks like mesonbuild/meson#957 was
reintroduced in meson-0.57.0 (and looking and https://mesonbuild.com/Release-notes-for-0-57-0.html
I'm not sure whether it was intentional or not) so run_command can no
longer be used to get around
mesonbuild/meson#3589. Let's just force
ctags to always use absolute paths to fix it once and for all.
Yamakuzure pushed a commit to elogind/elogind that referenced this issue Dec 21, 2022
Looks like mesonbuild/meson#957 was
reintroduced in meson-0.57.0 (and looking and https://mesonbuild.com/Release-notes-for-0-57-0.html
I'm not sure whether it was intentional or not) so run_command can no
longer be used to get around
mesonbuild/meson#3589. Let's just force
ctags to always use absolute paths to fix it once and for all.
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

1 participant