summaryrefslogtreecommitdiff
path: root/docs/yaml/objects
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2025-07-19 21:50:09 -0700
committerDylan Baker <dylan@pnwbakers.com>2025-07-22 09:05:22 -0700
commit092ab8c9e117cc00aa699c8d513572f95009cae8 (patch)
treef1423cd24212df161a9c45247d3cf78e87737659 /docs/yaml/objects
parent2b7661a43f8e85d666dd66ecddb85aedb154a58c (diff)
downloadmeson-092ab8c9e117cc00aa699c8d513572f95009cae8.tar.gz
Docs: standardize between list and array as array
When arrays were added they were called arrays. Because the are implemented with Python lists, that language started leaking into talking about Meson types. This is confusing. I've attempted, as much as possible, to move to using one name, array. I picked array because 1) It's the original name used, and 2) what Meson has are more properly arrays as they have a fixed length, while a critical property of lists are the ability to link and unlink them. There are a couple of places where the list language has leaked into the names of keyword arguments. I have not made any attempt to change those, I don't know if it's that useful or not.
Diffstat (limited to 'docs/yaml/objects')
-rw-r--r--docs/yaml/objects/cfg_data.yaml2
-rw-r--r--docs/yaml/objects/compiler.yaml48
-rw-r--r--docs/yaml/objects/custom_tgt.yaml4
-rw-r--r--docs/yaml/objects/dep.yaml7
-rw-r--r--docs/yaml/objects/generator.yaml10
5 files changed, 35 insertions, 36 deletions
diff --git a/docs/yaml/objects/cfg_data.yaml b/docs/yaml/objects/cfg_data.yaml
index 03abb1709..36f9755b4 100644
--- a/docs/yaml/objects/cfg_data.yaml
+++ b/docs/yaml/objects/cfg_data.yaml
@@ -114,7 +114,7 @@ methods:
description: The name of the variable to query
- name: keys
- returns: list[str]
+ returns: array[str]
since: 0.57.0
description: |
Returns an array of keys of
diff --git a/docs/yaml/objects/compiler.yaml b/docs/yaml/objects/compiler.yaml
index 43831d2c1..763060f18 100644
--- a/docs/yaml/objects/compiler.yaml
+++ b/docs/yaml/objects/compiler.yaml
@@ -45,9 +45,9 @@ methods:
description: You have found a bug if you can see this!
kwargs:
args:
- type: list[str]
+ type: array[str]
description: |
- Used to pass a list of compiler arguments.
+ Used to pass an array of compiler arguments.
Defining include paths for headers not in the default include path
via `-Isome/path/to/header` is generally supported, however, usually not
recommended.
@@ -61,7 +61,7 @@ methods:
description: You have found a bug if you can see this!
kwargs:
include_directories:
- type: inc | list[inc]
+ type: inc | array[inc]
since: 0.38.0
description: Extra directories for header searches.
@@ -70,7 +70,7 @@ methods:
description: You have found a bug if you can see this!
kwargs:
dependencies:
- type: dep | list[dep]
+ type: dep | array[dep]
description: Additionally dependencies required for compiling and / or linking.
- name: _prefix
@@ -78,7 +78,7 @@ methods:
description: You have found a bug if you can see this!
kwargs:
prefix:
- type: str | list[str]
+ type: str | array[str]
description: |
Used to add `#include`s and other things that are required
for the symbol to be declared. Since 1.0.0 an array is accepted
@@ -184,7 +184,7 @@ methods:
description: Returns the compiler's version number as a string.
- name: cmd_array
- returns: list[str]
+ returns: array[str]
description: Returns an array containing the command(s) for the compiler.
@@ -441,10 +441,10 @@ methods:
*(since 0.47.0)* The value of a `feature` option can also be passed here.
has_headers:
- type: list[str]
+ type: array[str]
since: 0.50.0
description: |
- List of headers that must be found as well.
+ An array of headers that must be found as well.
This check is equivalent to checking each header with a
[[compiler.has_header]] call.
@@ -468,7 +468,7 @@ methods:
description: If `true`, this method will return a [[@disabler]] on a failed check.
dirs:
- type: list[str]
+ type: array[str]
description: |
Additional directories to search in.
@@ -478,19 +478,19 @@ methods:
# does not work, since all _common kwargs need to be prefixed `header_` here
# kwargs_inherit: compiler._common
header_args:
- type: list[str]
+ type: array[str]
since: 0.51.0
description: |
When the `has_headers` kwarg is also used, this argument is passed to
[[compiler.has_header]] as `args`.
header_include_directories:
- type: inc | list[inc]
+ type: inc | array[inc]
since: 0.51.0
description: |
When the `has_headers` kwarg is also used, this argument is passed to
[[compiler.has_header]] as `include_directories`.
header_dependencies:
- type: dep | list[dep]
+ type: dep | array[dep]
since: 0.51.0
description: |
When the `has_headers` kwarg is also used, this argument is passed to
@@ -539,7 +539,7 @@ methods:
- compiler._required
- name: get_supported_arguments
- returns: list[str]
+ returns: array[str]
since: 0.43.0
varargs_inherit: compiler.has_multi_arguments
description: |
@@ -558,11 +558,11 @@ methods:
- `'require'`: Abort if at least one argument is not supported
- name: first_supported_argument
- returns: list[str]
+ returns: array[str]
since: 0.43.0
varargs_inherit: compiler.has_multi_arguments
description: |
- Given a list of strings, returns a single-element list containing the first
+ Given an array of strings, returns a single-element array containing the first
argument that passes the [[compiler.has_argument]] test or an empty array if
none pass.
@@ -601,7 +601,7 @@ methods:
- compiler._required
- name: get_supported_link_arguments
- returns: list[str]
+ returns: array[str]
since: 0.46.0
varargs_inherit: compiler.has_multi_link_arguments
description: |
@@ -621,11 +621,11 @@ methods:
# - `'require'`: Abort if at least one argument is not supported
- name: first_supported_link_argument
- returns: list[str]
+ returns: array[str]
since: 0.46.0
varargs_inherit: compiler.has_multi_link_arguments
description: |
- Given a list of strings, returns the first argument that passes the
+ Given an array of strings, returns the first argument that passes the
[[compiler.has_link_argument]] test or an empty array if none pass.
- name: has_function_attribute
@@ -645,7 +645,7 @@ methods:
- compiler._required
- name: get_supported_function_attributes
- returns: list[str]
+ returns: array[str]
since: 0.48.0
description: |
Returns an array containing any names that are supported GCC style attributes.
@@ -666,10 +666,10 @@ methods:
operating systems.
- name: preprocess
- returns: list[custom_idx]
+ returns: array[custom_idx]
since: 0.64.0
description: |
- Preprocess a list of source files but do not compile them. The preprocessor
+ Preprocess an array of source files but do not compile them. The preprocessor
will receive the same arguments (include directories, defines, etc) as with
normal compilation. That includes for example args added with
`add_project_arguments()`, or on the command line with `-Dc_args=-DFOO`.
@@ -694,15 +694,15 @@ methods:
the source filename and `@BASENAME@` is replaced by the source filename
without its extension.
compile_args:
- type: list[str]
+ type: array[str]
description: |
Extra flags to pass to the preprocessor
dependencies:
- type: dep | list[dep]
+ type: dep | array[dep]
description: Additionally dependencies required.
since: 1.1.0
depends:
- type: list[build_tgt | custom_tgt]
+ type: array[build_tgt | custom_tgt]
description: |
Specifies that this target depends on the specified
target(s). These targets should be built before starting
diff --git a/docs/yaml/objects/custom_tgt.yaml b/docs/yaml/objects/custom_tgt.yaml
index 5102ab949..60e067c30 100644
--- a/docs/yaml/objects/custom_tgt.yaml
+++ b/docs/yaml/objects/custom_tgt.yaml
@@ -25,9 +25,9 @@ methods:
custom target's output argument.
- name: to_list
- returns: list[custom_idx]
+ returns: array[custom_idx]
since: 0.54.0
description: |
- Returns a list of opaque objects that references this target,
+ Returns an array of opaque objects that references this target,
and can be used as a source in other targets. This can be used to
iterate outputs with `foreach` loop.
diff --git a/docs/yaml/objects/dep.yaml b/docs/yaml/objects/dep.yaml
index ffd19f797..fdf5fe505 100644
--- a/docs/yaml/objects/dep.yaml
+++ b/docs/yaml/objects/dep.yaml
@@ -34,11 +34,11 @@ methods:
kwargs:
define_variable:
- type: list[str]
+ type: array[str]
since: 0.44.0
description: |
You can also redefine a
- variable by passing a list to this kwarg
+ variable by passing an array to this kwarg
that can affect the retrieved variable: `['prefix', '/'])`.
*(Since 1.3.0)* Multiple variables can be specified in pairs.
@@ -224,7 +224,7 @@ methods:
description: The default value to return when the variable does not exist
pkgconfig_define:
- type: list[str]
+ type: array[str]
description: See [[dep.get_pkgconfig_variable]]
- name: as_static
@@ -250,4 +250,3 @@ methods:
recursive:
type: bool
description: If true, this is recursively applied to dependencies
- \ No newline at end of file
diff --git a/docs/yaml/objects/generator.yaml b/docs/yaml/objects/generator.yaml
index fbef95fa4..3dbcdd5d9 100644
--- a/docs/yaml/objects/generator.yaml
+++ b/docs/yaml/objects/generator.yaml
@@ -9,20 +9,20 @@ methods:
- name: process
returns: generated_list
description: |
- Takes a list of files, causes them to be processed and returns an object containing the result
+ Takes an array of files, causes them to be processed and returns an object containing the result
which can then, for example, be passed into a build target definition.
varargs:
name: source
min_varargs: 1
type: str | file | custom_tgt | custom_idx | generated_list
- description: List of sources to process.
+ description: sources to process.
kwargs:
extra_args:
- type: list[str]
+ type: array[str]
description: |
- If present, will be used to replace an entry `@EXTRA_ARGS@` in the argument list.
+ If present, will be used to replace an entry `@EXTRA_ARGS@` in the argument array.
preserve_path_from:
type: str
@@ -36,7 +36,7 @@ methods:
directory}/one.out`.
env:
- type: env | list[str] | dict[str]
+ type: env | array[str] | dict[str]
since: 1.3.0
description: |
environment variables to set, such as