Commit Graph

12756 Commits

Author SHA1 Message Date
Jussi Pakkanen 44c95087d0 Bump version number for new development. 2022-07-03 19:24:45 +03:00
Jussi Pakkanen 9c6dab2cfd Finalize the release. 2022-07-03 17:39:59 +03:00
smowzy 51dad83d46 Users.md: remove wxFormBuilder
according to commit 8a3d1697c8
2022-07-02 00:12:01 +03:00
Simon McVittie f0e9a44d41 test cases: Don't fall off the end of main() without an exit status
This is undefined behaviour, and seems to have caused test failures
when backporting Meson to an older toolchain in the Steam Runtime.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-06-30 09:55:48 -07:00
Eli Schwartz e06dd48ad2
docs: update various function references to be linkified 2022-06-29 20:33:35 -04:00
Eli Schwartz 4635fd5937
docs: fix broken link to structured sources
We used the wrong spelling for both the object and the function. Link to
both, once in the description and once in the example code.
2022-06-27 19:45:43 -04:00
Eli Schwartz 6cc1f26e55
docs: fix broken links in i18n modue
We want to talk about the kwargs to the custom_target() function, but
tried to link to custom_tgt instead, which is not a function. It is an
object, but this was the wrong reference method for a type.

We want the function anyway, so use that.
2022-06-27 19:43:39 -04:00
Eli Schwartz 21493fe5c6
docs: correctly classify module methods as a method, not a function 2022-06-27 18:29:48 -04:00
Eli Schwartz 8ef3909086
docs: grammar nit 2022-06-27 18:29:48 -04:00
Eli Schwartz 0960cd3c23
docs: encourage using the "setup" subcommand where appropriate 2022-06-27 18:29:48 -04:00
Eli Schwartz 5e445fd747
docs: fix confusing repetition
The end of the paragraph indicates that the options which support --foo
will be listed in the help text. The beginning of the paragraph seems to
suggest the same thing, except it doesn't distinguish between -Dfoo and
--foo style options.

The first mention is redundant and feels like the wrong part of the
paragraph to mention it anyway.
2022-06-27 18:29:48 -04:00
Eli Schwartz 4e43970752
docs: linkify some function references 2022-06-27 18:29:48 -04:00
Dylan Baker 32ebb81f1a dependencies: update llvm versions
15 is the current snapshot version, 13 and 14 are released.
2022-06-27 22:16:46 +03:00
Jussi Pakkanen eee861845d Bump version number for rc2. 2022-06-27 18:12:30 +03:00
Eli Schwartz 0be3532456 docs: fix yaml refman example of embedding links in a code comment
With the previous commit, we made this smartly detect when parentheses
are not needed. But the example was broken, because it doesn't follow
its own documented rules to use `[[#` syntax. Add the missing hash
character.
2022-06-27 17:07:33 +02:00
Eli Schwartz ad0c70bac1 docs: make the refman linkification slightly prettier for codeblocks
If we link to

```meson
[[#function]]('posarg')
```

then the ideal linkification would operate on "function" in the
formatted text:

```
function('posarg')
```

Instead, it operated on "function()" in the formatted text:

```
function()('posarg')
```

Fix this by detecting the next character after the reference, and
skipping the usual "automatically append the () for you" stage if it
already has that opening parenthesis.
2022-06-27 17:07:33 +02:00
Akihiko Odaki c2c9359d46 Fix destdir_join
The old implementation assumed a path is of Windows iff the second
character is a colon. However, that is not always true.
First, a colon can be included in a non-Windows path. For example, it is
totally fine to have a directory named ':' on Linux 5.17.0 tmpfs.
Second, a Windows path may start with \\ for UNC or extended length.

Use pathlib to handle all of these cases.
2022-06-26 17:18:26 -04:00
Tad Young 4c706e961b
add missing lower() to fix msvc backend platform detection
Regardless of which MachineChoice we base the platform on, we compare
its value to lowercased identifiers. So we need to lowercase the
targetplatform too... but we only did so sometimes.

This broke e.g. on "Win32", but only when *not* doing a cross build.

Fixes #10539
2022-06-26 08:10:12 -04:00
neilnaveen 5f8b0487ab chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
2022-06-24 23:46:38 -07:00
fxxf 650cea3d08 fix: handle the case where the last item of `four_column` results in being < 1 (COLUMNS <= 60) by falling back to `_col`, relevant issue #10211 2022-06-24 00:17:56 -04:00
Xavier Claessens 1a3d29dd0e Move python version check as first thing 2022-06-22 09:13:05 -07:00
Eli Schwartz b05d7db443
fix type checking for declare_dependency to allow linking to executable
We have to handle this, because Windows needs to link to the implib of
the executable (???) in order to create a shared module. This is
explicitly checked for and handled in the backend, and creating a build
target with `link_with: some_exe` still works, even. But updating
declare_dependency to typed_kwargs neglected to take that into account,
so creating a convenience interface for those same arguments failed.
2022-06-21 16:42:06 -04:00
Eli Schwartz a20523aa5f
docs: grammar and formatting nits 2022-06-21 16:29:30 -04:00
Eli Schwartz b72a5668c2
docs: remove incorrect information about nonexisting kwarg 2022-06-21 16:29:17 -04:00
CLanguagePurist 87b4b0d4e7
Update Unit-tests.md (#10515) 2022-06-21 21:49:12 +03:00
Chun-wei Fan 6e7c3efa79 visualstudio.py: Apply /utf-8 only on clang or VS2015+
In PR 10263, we didn't account for that we may have initialize the Visual
Studio-like compiler two times, once for a C compiler and once for the
C++ compiler, so we end up with Meson breaking on Visual Studio 2013
or earlier, such as when building GLib.

Fix this by setting up the always_args member of
the VisualStudioLikeCompiler instance during __init__() as needed, so that
we avoid falling into modifying shared objects.
2022-06-21 21:08:06 +03:00
Jussi Pakkanen 28a9c1fdad Update version numbers for rc1. 2022-06-19 22:20:53 +03:00
Jussi Pakkanen df4714be95
Merge pull request #10464 from rtbo/fix_generated_deps
add D generated files to order-only deps
2022-06-19 22:16:20 +03:00
Eli Schwartz 22dcb692ad python module: implicitly add python dep to extensions
If there isn't a preexisting dependency on python, append one. It's
almost assuredly needed, so just do the right thing out of the box.
2022-06-19 21:44:17 +03:00
Eli Schwartz 43c60318fd python module: cache dependency() lookup between invocations
Modeled similarly after the installations cache, but using the coredata
dependency cache because it has a nice mechanism for handling the cache
key.
2022-06-19 21:44:17 +03:00
Eli Schwartz ea952966b4
update gnome test to cover built gresource files
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
2022-06-19 10:47:47 -04:00
Eli Schwartz 28835cce71 gnome module: fix regression that broke using built xml files as gresources
In commit 3dcc712583 we moved to
typed_pos_args. In the process, we deleted some code to specifically
raise an error if you use custom_target or generator outputs, instead
leaving it out of the typed pos args.

However, that support was specifically supposed to be there. It was only
an error in part of an if statement for handling old versions of
glib-compile-resources. The specific error it calls out is that we need
to manually parse the depfile at configure time, due to an external bug;
obviously this is impossible if the gresource is only created at build
time.

Reinstate the original error message check, and allow built outputs to
be used as compile_resources() inputs.

Fixes #10367
2022-06-19 17:39:18 +03:00
Olexa Bilaniuk b19d312dc7 Update CUDA Toolkit/driver version table for recent releases.
Agrees with Release Notes, Section 1.1, Table 3.
https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html
2022-06-19 02:08:20 -04:00
Staz M 7409f12a82 always run external projects multi-threaded if possible
The check for if the project supports the -j flag was needlessly
complex. We support two types of project:
- waf, always supports -j
- make, if GNU, supports -j

We never checked waf, and the make check assumed that the entire
command, rather than just the last component, was "make". It also
neglects "gmake".

Since any possible build command *may* support -j, always run the
--version check. Detect either build command in the output.
2022-06-17 18:56:38 -04:00
Staz M 7da495f616 always set DESTDIR via the environment for external projects
It doesn't matter whether it is make or not, because make, too, supports
setting it via the env. This reduces the use of special cases in the
code.
2022-06-17 18:56:38 -04:00
Xavier Claessens 807cbcb350 external-project: Add depends kwarg
The unit test was racy but surprisingly never failed on CI. The reason
is we need to ensure ninja build somelib.so before running `make` into
the external project.
2022-06-17 18:56:13 -04:00
Eli Schwartz 47426f3663
migrate declare_dependency to typed_kwargs 2022-06-17 14:33:02 -04:00
Eli Schwartz ca52dac38b
refactor logic for parsing dependency variables into type_checking module
We will momentarily use this to implement typed_kwargs, but not for all
usage sites.
2022-06-17 14:33:02 -04:00
Eli Schwartz b13a95c301
docs: d_module_versions has an undocumented ability to accept integers
Dlang uses both integer version "levels" and arbitrary string
identifiers, and we support both, but don't mention it in the docs.

Also update a test case to pass one via declare_dependency. We already
test this kwarg for build_target.
2022-06-17 14:33:02 -04:00
Eli Schwartz e99e55d0aa
docs: fix incorrect info for declare_dependency sources
The type information is clearly wrong as it disagrees with the
description w.r.t. generated headers.

We also rely on it accepting custom targets for the obvious reason that
we accept it in a build target too! In fact, we rely on this in the
testsuite too.
2022-06-17 14:33:01 -04:00
Eli Schwartz edb38fd6f6
fix confusing incorrect default name for a KwargInfo
We can use this lots of places, and it's always the same kwarg. There
doesn't seem to be a point in naming it badly, then evolving it to the
standard name in the one place it is currently used. This made it not
shareable.
2022-06-17 14:33:01 -04:00
Eli Schwartz c1aeb2f7e4
typed_kwargs: support dict/list as "new since" types
Given a kwarg value that is itself a dict/list, we would only check if
the since_values was present within that container. If the since_values
is itself the dict or list type, then we aren't looking for recursive
structures, we just want to know when the function began to accept that
type.

This is relevant in cases where a function accepted a dict, and at one
point began accepting a list (of strings in the form 'key=value'), or
vice versa.
2022-06-17 14:33:01 -04:00
Hemmo Nieminen b49b9f52b2 interpreter: fix a subproject check with symlinks
The check for whether or not a file is allowed to be accessed from a
subproject fails if the subproject is accessed via a symlink. Use the
absolute path of the subproject without resolving symlinks to fix the
check.

Extend unit test 106 to check for this in the future.
2022-06-17 14:18:05 -04:00
Michael Mera 9b21428006 fix parameter expansion in several error messages
At several points in the code base, f-strings are not correctly expanded
due to missing 'f' string prefix. This fixes all the occurrences I could
find.
2022-06-17 12:16:42 -04:00
Xavier Claessens a693e2d091 devenv: Do not use relative WINEPATH
It forces launching executables from the top builddir which users might
not expect and creates hard to understand issues.
2022-06-17 11:53:38 -04:00
Xavier Claessens 57909b53d6 Improve WINEPATH reduction
- Remove duplicated code in mdevenv.py
- Change the limit to 1024 instead of 2048 which is what has been
  tested.
- Skip shortening if it is already short enough.
- Skip shortening with wine >= 6.4 which does not seems to have that
  limitation any more.
- Downgrade exception to warning in the case WINEPATH cannot be
  shortened under 1024 chars, it is possible that it will still work.
2022-06-17 11:53:38 -04:00
Xavier Claessens b1649899a2 ExternalProgram: Make get_version() work without interpreter 2022-06-17 11:53:38 -04:00
Eli Schwartz 41860f686f docs: ensure stable order of release notes
Merging snippets happens in arbitrary order -- whatever filesystem
globbing results in. This didn't matter too much when we ran it once at
release time and checked the resulting release notes into git. However,
now that we generate a temporary version of the release notes for
development versions, the order of the results will periodically change.

Sort the files before processing them in order to guarantee that
whatever order they are in, they stay that way.

As a side effect, it's now technically possible to guarantee an ordering
by judicious use of snippets naming.
2022-06-17 06:48:45 -04:00
Eli Schwartz b87067dc8b
fix regression that broke proper warnings about passing subproject as a dep
Regression in commit 7c757dff71.
SubprojectHolder is no longer an ObjectHolder and says so via a TODO:
this means that we have to fiddle with held_object. Yay.
2022-06-16 21:19:06 -04:00
fxxf c72715db68
test (failing): 127 subproject object as a dependency 2022-06-16 21:19:06 -04:00