Skip to content

Commit

Permalink
Convert string args to d_import_dirs.
Browse files Browse the repository at this point in the history
Also update the documentation to reflect the accepted types.

Fixes: mesonbuild#12742
  • Loading branch information
amcn committed Sep 7, 2024
1 parent 53e1148 commit 24e3eac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions docs/yaml/functions/_build_target_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,11 @@ kwargs:
do not support GNU visibility arguments.
d_import_dirs:
type: list[str]
description: List of directories to look in for string imports used in the D programming language.
type: list[inc | str]
since: 0.62.0
description: |
the directories to add to the string search path (i.e. `-J` switch for DMD).
Must be [[@inc]] objects or plain strings.
d_unittest:
type: bool
Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/interpreter/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3486,7 +3486,7 @@ def kwarg_strings_to_includedirs(self, kwargs: kwtypes._BuildTarget) -> None:
mlog.warning('''Building a path to the source dir is not supported. Use a relative path instead.
This will become a hard error in the future.''', location=self.current_node)
i = os.path.relpath(i, os.path.join(self.environment.get_source_dir(), self.subdir))
i = self.build_incdir_object([i])
i = self.build_incdir_object([i])
cleaned_items.append(i)
kwargs['d_import_dirs'] = cleaned_items

Expand Down

0 comments on commit 24e3eac

Please sign in to comment.