]>
git.ipfire.org Git - thirdparty/vala.git/log
Chun-wei Fan [Fri, 28 Jan 2022 04:50:38 +0000 (12:50 +0800)]
valaccompiler.vala: Check for MSVC-like compiler
If we are using an enviroment where it is set up to be like a Visual Studio
cmd.exe prompt, and if CC is not set, we assume that we are using Visual Studio
Thus, we need to call pkg-config with the --msvc-syntax flag. This also apples
if we choose to use clang-cl, so that we can use the correct C compiler/linker
flags when we compile the generated C-code.
Chun-wei Fan [Thu, 27 Jan 2022 04:43:45 +0000 (12:43 +0800)]
meson: Symlink to valacodegen.dll in bindir
This is so that valac builds on Windows can find valacodegen.dll when we
are doing shared builds.
Chun-wei Fan [Wed, 26 Jan 2022 10:22:21 +0000 (18:22 +0800)]
meson: Make tests run better on MSVC builds
Use compiler flags that would work on Visual Studio so that tests can
run much better than without. Currently, one may need to set the
PKG_CONFIG envvar to `<pkg-config-executable> --msvc-syntax` for this to
work best.
Chun-wei Fan [Wed, 26 Jan 2022 05:10:26 +0000 (13:10 +0800)]
meson: Port install scripts for cmd.exe shells
On Windows builds using Visual Studio-like compilers, we are using
cmd.exe shells, so we do the symlinking of the tools and man pages using
the commands that Windows provides.
Also, group the various programs and man pages together so that we have
single commands for each of the subdirs that we want to run the install
scripts, to make things simpler.
Chun-wei Fan [Wed, 26 Jan 2022 05:08:46 +0000 (13:08 +0800)]
ccode, compiler: Include compat headers for MSVC
The generated code include unistd.h and utime.h, so include the compat
headers in $(srcroot)/msvc to cover for those.
Chun-wei Fan [Wed, 26 Jan 2022 05:07:29 +0000 (13:07 +0800)]
gobject-introspection: Don't include unistd.h on MSVC
Visual Studio does not come with this header, so don't try to include it
in C code when building for Visual Studio.
Chun-wei Fan [Mon, 24 Jan 2022 11:35:40 +0000 (19:35 +0800)]
build: Add Visual Studio compat headers
Visual Studio does not come with unistd.h and utime.h, so building items
that originate from glib-2.0.vapi et al will fail if items that depend
on these headers are used.
Do overcome this, add compat headers for them that will include the
appropriate headers from Visual Studio (or the Windows SDK), to fix the
build.
Chun-wei Fan [Mon, 24 Jan 2022 11:14:57 +0000 (19:14 +0800)]
vala/meson.build: Use Python to generate libvala-0.xx.vapi
This way, we do not need to depend on the 'cat' utility program which is
not readily available on Windows unless one is using MSYS2 or Cygwin.
Chun-wei Fan [Mon, 24 Jan 2022 10:27:05 +0000 (18:27 +0800)]
meson.build: Don't use GCC-specific CFlags on MSVC
They cause more trouble than help on Visual Studio builds. Instead, use
msvc_recommended_pragmas.h which is included with GLib that should cover
at least most of the items covered by those CFlags.
Chun-wei Fan [Mon, 24 Jan 2022 10:02:24 +0000 (18:02 +0800)]
meson: Look for win_[flex|bison] too
People might have installed win_flex and/or win_bison, which work better
for native Windows builds.
Rico Tzschichholz [Mon, 11 Feb 2019 19:25:15 +0000 (20:25 +0100)]
WIP meson: Add meson-bootstrap.sh
Rico Tzschichholz [Thu, 26 Aug 2021 09:31:18 +0000 (11:31 +0200)]
Broken evaluation of "Requires.private: gmodule-no-export-2.0" in gio-2.0.pc ?
/usr/bin/ld: .../lib/libgio-2.0.so: undefined reference to `g_module_open_full'
Rico Tzschichholz [Sun, 7 Feb 2021 21:03:21 +0000 (22:03 +0100)]
Pass LD_LIBRARY_PATH as "env" where needed
Rico Tzschichholz [Tue, 12 Feb 2019 15:30:34 +0000 (16:30 +0100)]
WIP meson: Add internal-api-docs
Rico Tzschichholz [Sun, 10 Feb 2019 18:58:46 +0000 (19:58 +0100)]
WIP meson: Add tests
Rico Tzschichholz [Mon, 7 Sep 2020 15:57:31 +0000 (17:57 +0200)]
meson: Compile everything with stricter cflags
Ole André Vadla Ravnås [Tue, 31 Jul 2018 00:17:55 +0000 (02:17 +0200)]
meson: Allow static builds
By using `library()` instead of hard-coding `shared_library()`.
Rico Tzschichholz [Sun, 10 Feb 2019 18:58:46 +0000 (19:58 +0100)]
meson: Add initial build support
Rico Tzschichholz [Wed, 26 Jan 2022 18:34:06 +0000 (19:34 +0100)]
codegen: Write array length of formal parameters with fixed length
"void foo (gint i[3]) { ... }" instead of "void foo (gint* i) { ... }"
wxx [Tue, 30 Nov 2021 18:54:04 +0000 (02:54 +0800)]
vala: Transform assignment of an array element as needed
Fixes https://gitlab.gnome.org/GNOME/vala/issues/889
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1258
Nikola Hadžić [Tue, 25 Jan 2022 09:07:04 +0000 (10:07 +0100)]
v4l2: Update V4l2.Capabilities and fix some inline arrays
Nikola Hadžić [Tue, 25 Jan 2022 09:03:00 +0000 (10:03 +0100)]
posix: Add limits.h binding
Nikola Hadžić [Tue, 25 Jan 2022 09:02:17 +0000 (10:02 +0100)]
alsa: Add/fix *.alloca() functions
Nikola Hadžić [Tue, 25 Jan 2022 09:01:54 +0000 (10:01 +0100)]
vapi: Add linux-media bindings (linux/media.h)
Nahuel Gomez [Tue, 25 Jan 2022 17:23:58 +0000 (14:23 -0300)]
glib-2.0: Fix criticals in string.joinv() with arrays that start with null
Rico Tzschichholz [Tue, 25 Jan 2022 17:10:49 +0000 (18:10 +0100)]
parser: Improve handling of nullable VarType in with-statement
Princeton Ferro [Tue, 25 Jan 2022 16:06:23 +0000 (11:06 -0500)]
codegen: Cast generic return value from g_sequence_get()
Use convert_from_generic_pointer() to generate C code without warnings
when accessing scalar elements from a GSequence.
Addtionally check type arguments of given GSequence during codegen.
In addition to
44195a02c9d26453dc698282deb4947425a4b0b1
Lorenz Wildberg [Wed, 8 Dec 2021 18:41:39 +0000 (18:41 +0000)]
vala: Add support to infer return type of dynamic signals
Princeton Ferro [Tue, 25 Jan 2022 03:32:01 +0000 (22:32 -0500)]
vala: Add foreach statement support for GLib.Sequence
It is now possible to use foreach with a GLib.Sequence
Princeton Ferro [Mon, 24 Jan 2022 16:50:25 +0000 (11:50 -0500)]
vala: Add foreach statement support for GLib.Array
It is now possible to use foreach with a GLib.Array
Rico Tzschichholz [Mon, 24 Jan 2022 09:17:46 +0000 (10:17 +0100)]
codegen: Access of stack allocated struct is guaranteed to be non null
Found by -Werror=address with GCC 12
See https://gitlab.gnome.org/GNOME/vala/issues/1282
Rico Tzschichholz [Mon, 24 Jan 2022 09:17:46 +0000 (10:17 +0100)]
codegen: Don't uncoditionally null check callback_func for GLib.Closure
Found by -Werror=address with GCC 12
See https://gitlab.gnome.org/GNOME/vala/issues/1282
Rico Tzschichholz [Sun, 23 Jan 2022 17:46:48 +0000 (18:46 +0100)]
codegen: Access of inline allocated array is guaranteed to be non null
and improve null check for container in slice expression
Found by -Werror=address with GCC 12
See https://gitlab.gnome.org/GNOME/vala/issues/1282
Rico Tzschichholz [Fri, 21 Jan 2022 12:27:37 +0000 (13:27 +0100)]
gtk4: Update to 4.6.0+
a092986a
Rico Tzschichholz [Fri, 21 Jan 2022 12:27:21 +0000 (13:27 +0100)]
gstreamer: Update from 1.19.3+ git master
Rico Tzschichholz [Fri, 21 Jan 2022 12:22:56 +0000 (13:22 +0100)]
glib-2.0,gio-2.0: Update 2.72 symbols
Princeton Ferro [Mon, 17 Jan 2022 17:28:31 +0000 (12:28 -0500)]
vala: async-ize main block when yield is used
This allows yield statements and expressions to be used in the main
block.
Rico Tzschichholz [Wed, 19 Jan 2022 07:55:38 +0000 (08:55 +0100)]
vala: Make Vala.Variable an abstract class
Rico Tzschichholz [Tue, 18 Jan 2022 17:42:11 +0000 (18:42 +0100)]
vala: Implement missing YieldStatement.accept()
Rico Tzschichholz [Tue, 18 Jan 2022 13:33:15 +0000 (14:33 +0100)]
parser: Reduce the source reference of main block method to its beginning
The end contains broken information which lead to a crash while trying to
report this multi-line source reference.
Alvarito050506 [Mon, 17 Jan 2022 19:00:16 +0000 (16:00 -0300)]
codegen: Avoid symbol clashes with "va_*" from "stdarg.h"
A few more symbol clashes with the va_* macros from stdarg.h, that seem to
happen only in some systems, like Alpine Linux or NetBSD.
Princeton Ferro [Thu, 13 Jan 2022 07:40:18 +0000 (02:40 -0500)]
codegen: Add support for async main
If main() is async then setup a new GMainLoop and call _vala_main()
asynchronously.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1275
Rico Tzschichholz [Sun, 16 Jan 2022 18:25:51 +0000 (19:25 +0100)]
vala: Require lvalue access of delegate target/destroy "fields"
In addition to
c054da918a40f8ef93c1a006034fb6ab4717c135
See https://gitlab.gnome.org/GNOME/vala/issues/857
Rico Tzschichholz [Fri, 14 Jan 2022 15:20:42 +0000 (16:20 +0100)]
Release 0.55.1
Rico Tzschichholz [Fri, 14 Jan 2022 13:37:12 +0000 (14:37 +0100)]
vapi: Update GIR-based bindings
Rico Tzschichholz [Fri, 14 Jan 2022 11:47:24 +0000 (12:47 +0100)]
gtk4: Update to 4.6.0+
06e5da45
Rico Tzschichholz [Sun, 9 Jan 2022 18:49:27 +0000 (19:49 +0100)]
codegen: Generated SimpleType structs don't have a type id
Set "CCode.has_type_id" in CCodeStructModule.generate_struct_declaration()
like in GTypeModule.visit_struct() for SimpleType structs which might be
executed too late.
In addition to
2e798fc3f8e9af25a4c231c2561894d9f0a0be50
Rico Tzschichholz [Sat, 8 Jan 2022 20:49:40 +0000 (21:49 +0100)]
Sync NEWS from 0.54
Rico Tzschichholz [Sat, 8 Jan 2022 18:23:58 +0000 (19:23 +0100)]
vapi: Update GIR-based bindings
Rico Tzschichholz [Thu, 6 Jan 2022 07:50:31 +0000 (08:50 +0100)]
tests: Skip runtime of array length type test on "32-bit"
Rico Tzschichholz [Wed, 5 Jan 2022 19:45:10 +0000 (20:45 +0100)]
codegen: Clear existing length values when revisiting a slice expression
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1274
Rico Tzschichholz [Wed, 5 Jan 2022 07:25:19 +0000 (08:25 +0100)]
tests: Add "async signal handler" test to increase coverage
Rico Tzschichholz [Thu, 15 Apr 2021 14:49:14 +0000 (16:49 +0200)]
Add native support to specify non default length-type for arrays
string[:long] foo = new string[:long] { "foo" };
This applies to generated bindings where this new syntax will be
picked up. It will apply a stricter variable type checking for
such array types.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/607
Lorenz Wildberg [Sat, 4 Dec 2021 19:05:42 +0000 (19:05 +0000)]
Support "emit" for explicit signal emission
If "foo" is a signal then "foo.emit (...);" is allowed now additionally to
"foo (...);". This is required to emit dynamic signals.
Rico Tzschichholz [Mon, 3 Jan 2022 15:51:31 +0000 (16:51 +0100)]
tests: Add XFAIL tests if undefined behavior sanitizer is enabled
In addition to
d3bfaa4ae34c0e6c7a7a9d124e6c3a276c545391
Rico Tzschichholz [Mon, 3 Jan 2022 15:51:31 +0000 (16:51 +0100)]
tests: Skip constants/member-access-enum.vala for ASAN
In addition to
50414570d1b54a6106a9a64274bb84977d817616
Val Och [Fri, 31 Dec 2021 17:25:49 +0000 (20:25 +0300)]
codegen: Use __once instead of __volatile in generated code
This better reflects purpose of relevant variables, especially
given that they aren't volatile anymore on GLib 2.68+.
Rico Tzschichholz [Mon, 3 Jan 2022 12:59:36 +0000 (13:59 +0100)]
codegen: Initialize "result" variable on declaration for abstract methods only
Rico Tzschichholz [Mon, 3 Jan 2022 12:59:36 +0000 (13:59 +0100)]
codegen: Cast given default-value of struct with possible member initializer
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1272
Rico Tzschichholz [Mon, 3 Jan 2022 08:07:00 +0000 (09:07 +0100)]
codegen: Allow boxing of non-external SimpleType structs
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1273
Rico Tzschichholz [Tue, 28 Dec 2021 12:18:46 +0000 (13:18 +0100)]
gio-2.0: Add custom MemoryOutputStream.with_*data() wrappers
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1271
Rico Tzschichholz [Mon, 27 Dec 2021 06:44:31 +0000 (07:44 +0100)]
vala: Show source location when reporting deprecations
Rico Tzschichholz [Mon, 27 Dec 2021 06:41:09 +0000 (07:41 +0100)]
Revert "Make more use of native GLib.Regex syntax"
This reverts commit
b2ef0ed8d2c37a813f9ad8b35c7a7e4a1d639e1c .
Rico Tzschichholz [Wed, 22 Dec 2021 08:16:52 +0000 (09:16 +0100)]
Make more use of native GLib.Regex syntax
Rico Tzschichholz [Sat, 18 Dec 2021 21:25:54 +0000 (22:25 +0100)]
parser: Improve partial classes support
Fixes https://gitlab.gnome.org/GNOME/vala/issues/370
Rico Tzschichholz [Mon, 20 Dec 2021 19:40:30 +0000 (20:40 +0100)]
vala: Correctly replace "in" expression in pre-/postconditions of method
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1269
Rico Tzschichholz [Fri, 17 Dec 2021 10:43:33 +0000 (11:43 +0100)]
vala: Silently accept unsafe assignment of "0" literal to enum type
In addition to
9f1de7ae875b59939ca6200e08dddd69106fb486
Rico Tzschichholz [Fri, 17 Dec 2021 10:43:33 +0000 (11:43 +0100)]
Properly use [Flags] feature for ModifierFlags and CCodeModifiers
See
2afaae5e0755b2d8619808d2d148761b92c355b5
Rico Tzschichholz [Thu, 16 Dec 2021 14:31:47 +0000 (15:31 +0100)]
vala: Non nullable enum types are simple types
Fixes a regression of
5b6345a6386b05aaf3f11cb3572940413eb878a8
Rico Tzschichholz [Thu, 16 Dec 2021 14:31:47 +0000 (15:31 +0100)]
vala: Allow unsafe assignment of integer to enum while reporting a notice
Rico Tzschichholz [Thu, 16 Dec 2021 08:32:25 +0000 (09:32 +0100)]
Sync NEWS from 0.54
Rico Tzschichholz [Wed, 15 Dec 2021 20:42:53 +0000 (21:42 +0100)]
girparser: Avoid possibily creating duplicated attributes
Don't append an attribute without checking if there is an existing one.
In case the attribute already exists append the new key/value pairs.
Rico Tzschichholz [Wed, 15 Dec 2021 15:27:56 +0000 (16:27 +0100)]
vapi: Update GIR-based bindings
Corentin Noël [Wed, 8 Dec 2021 11:30:32 +0000 (12:30 +0100)]
gstreamer-1.0: Unskip the ElementFactory.make/create_full() symbols
Also add floating reference to all the new creation functions.
Rico Tzschichholz [Tue, 14 Dec 2021 08:04:48 +0000 (09:04 +0100)]
codegen: Initialize type parameter properties for generics earlier
If g_object_new() is used then additionally initialize type parameter
properties with it.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/67
Rico Tzschichholz [Tue, 14 Dec 2021 09:38:37 +0000 (10:38 +0100)]
tests: Add "type-parameter property clash" test to increase coverage
This needs to be handled gracefully. So throwing an error is no option.
Rico Tzschichholz [Mon, 13 Dec 2021 18:35:47 +0000 (19:35 +0100)]
codegen: Use a dedicated EmitContext for _variant_get*() functions
Rico Tzschichholz [Mon, 13 Dec 2021 11:38:01 +0000 (12:38 +0100)]
vala: Report statement parsing error if it is not meant to be an expression
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1261
Rico Tzschichholz [Sun, 12 Dec 2021 17:47:53 +0000 (18:47 +0100)]
vala: Drop duplicate check for unsupported flag of struct methods
Rico Tzschichholz [Sun, 12 Dec 2021 17:47:53 +0000 (18:47 +0100)]
vala: Drop duplicate check for unsupported flag of creation methods
Rico Tzschichholz [Sun, 12 Dec 2021 17:47:53 +0000 (18:47 +0100)]
tests: Add more "chain up" tests to increase coverage
Rico Tzschichholz [Sun, 12 Dec 2021 17:47:53 +0000 (18:47 +0100)]
vala: Set is_yield_expression in async context when chaining up to async base ctor
vala-CRITICAL **: vala_member_access_get_inner: assertion 'self != NULL' failed
vala-CRITICAL **: vala_member_access_get_member_name: assertion 'self != NULL' failed
Avoid these spurious criticals and trigger the currently expected error.
Rico Tzschichholz [Sat, 11 Dec 2021 09:34:03 +0000 (10:34 +0100)]
codegen: Correctly handle chain up of struct creation methods
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1264
Rico Tzschichholz [Sat, 11 Dec 2021 09:34:03 +0000 (10:34 +0100)]
tests: Add missing tests/structs/struct-static-field-initializer.c-expected
wxx [Sat, 4 Dec 2021 09:17:47 +0000 (17:17 +0800)]
vala: NullLiteral is not a valid argument for string concatenation
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1260
Rico Tzschichholz [Mon, 6 Dec 2021 21:23:28 +0000 (22:23 +0100)]
gtkmodule: Handle nested closure elements and bind them accordingly
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1262
Lorenz Wildberg [Mon, 29 Nov 2021 21:31:28 +0000 (21:31 +0000)]
tests/girwriter: Use the actual expected output of our girwriter
Rico Tzschichholz [Wed, 1 Dec 2021 16:11:42 +0000 (17:11 +0100)]
build: Update git-version-gen to latest upstream
From commit
378351df7e63daca234c581f086b542026e07a27 of
https://git.savannah.gnu.org/cgit/autoconf.git/tree/build-aux/git-version-gen
Alexander Kanavin [Fri, 23 Oct 2015 13:13:54 +0000 (16:13 +0300)]
vapigen.m4: use $PKG_CONFIG_SYSROOT_DIR
This is necessary in cross-compiling environments, where directories
returned by pkg-config should be prefixed with sysroot location.
Rico Tzschichholz [Sat, 6 Nov 2021 17:55:38 +0000 (18:55 +0100)]
vala: Check accessibility of initializer for constant and enum value
Rico Tzschichholz [Tue, 30 Nov 2021 12:37:29 +0000 (13:37 +0100)]
glib-2.0: Always use the actual C type for CCode.array_length_type
Rico Tzschichholz [Mon, 29 Nov 2021 20:01:32 +0000 (21:01 +0100)]
Sync NEWS from 0.54
Rico Tzschichholz [Mon, 29 Nov 2021 14:51:49 +0000 (15:51 +0100)]
tests: Add missing methods/parameter-ccode-type.vala
In addition to
0e097710e37b671b17ed1da330dd83b9e2340602
Rico Tzschichholz [Mon, 29 Nov 2021 09:36:54 +0000 (10:36 +0100)]
vapi: Update GIR-based bindings
Lorenz Wildberg [Sat, 27 Nov 2021 21:10:40 +0000 (21:10 +0000)]
tests: Rename colliding test case to avoid conflict
Rico Tzschichholz [Sun, 28 Nov 2021 11:45:25 +0000 (12:45 +0100)]
vapi: Add gnome-desktop-4, gnome-bg-4 and gnome-rr-4 bindings
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1257
Rico Tzschichholz [Sun, 28 Nov 2021 11:45:25 +0000 (12:45 +0100)]
gnome-desktop-3.0: Some parameter fixes
Rico Tzschichholz [Sat, 27 Nov 2021 18:26:35 +0000 (19:26 +0100)]
codegen: Accept CCode.type attribute on parameters
Fixes https://gitlab.gnome.org/GNOME/vala/issues/876
Rico Tzschichholz [Sat, 27 Nov 2021 18:26:35 +0000 (19:26 +0100)]
codegen: Drop inconsistent space for ObjectType parameters
Rico Tzschichholz [Fri, 26 Nov 2021 22:03:37 +0000 (23:03 +0100)]
tests: Rename colliding test cases to avoid conflicts