224 Commits

Author SHA1 Message Date
Stone Tickle
830036fe82 update formatting
This formatting isn't ideal but is okay for now.  Should be improved
prior to 0.3 release
2024-04-15 16:24:32 -04:00
Stone Tickle
58e3eaa938 rewrote formatter 2024-04-15 16:24:28 -04:00
Andrew McNulty
25f8e616ef interpreter: Correct return value state handling
In cases where a script module function returns
void, while also calling an internal function which
does not return void, the return type of the internal
function ends up as the expected return type of the
outer void-returning function, yielding type failure.

Admittedly this is a very contrived example and only
likely to show up when prototyping new script modules
but it was nonetheless causing me difficulties in
exactly that situation so I have fixed it and
extended the script_module test to cover this case.
2024-02-24 06:32:01 -05:00
Stone Tickle
6a4f7a3886
change muon private dir to .muon 2024-01-31 07:03:23 -05:00
Stone Tickle
70fcd6a526
add meson.project() for modules to get proj info 2024-01-08 11:20:58 -05:00
Stone Tickle
0b860734a3
make analyzer a little smarter about returns
The return will actually return if the codepath it was reached by is
entirely pure.  This will likely need tweaking but it works well for
simple cases.
2023-12-31 20:01:13 -05:00
Stone Tickle
2ce0b3856a
improve handling of multiple returns in analyzer 2023-12-30 20:41:42 -05:00
Stone Tickle
769f0d508a
improve function typechecking function analysis
Functions are now analyzed when they are defined so they aren't
erroneously marked as dead code.  This led to some weird typechecking
issues that ended up pushing me to clean up some of the typechecking
code.
2023-12-30 14:20:16 -05:00
Stone Tickle
97ba99ade9
update type system to support nested types
These new types are supported in the typechecker as well as the script
module syntax.
2023-12-16 12:07:40 -05:00
Stone Tickle
5a42eff752
muon project tests: skip test with exit code
if MESON_SKIP_TEST  exit with 77 rather than 0 to indicate a skipped
test
2023-12-12 16:43:38 -05:00
Stone Tickle
de372bafd5
support type annotations in script 2023-12-12 16:03:42 -05:00
Stone Tickle
a79114509e
add typeof function 2023-12-12 07:45:22 -05:00
Stone Tickle
923e6ab745
add test to ensure array kwarg not flattened 2023-12-12 06:44:37 -05:00
Stone Tickle
5c45fb8ceb
allow modules to access builtin meson vars 2023-12-11 21:03:08 -05:00
Stone Tickle
ad2756f260
add missing copyright 2023-12-06 21:53:41 -05:00
Stone Tickle
f627ba159e
add a script module test 2023-12-06 21:41:10 -05:00
Stone Tickle
d2fc8afeca
make analyzer happy about 162 subir if_found 2023-12-06 16:55:03 -05:00
Seedo Paul
a9eb180220
mod/python: add some test cases
Signed-off-by: Seedo Paul <seedoeldhopaul@gmail.com>
2023-11-11 20:48:03 -05:00
Stone Tickle
6416305a94
reformat and fix issues with python module changes
- fix python3.find_python return type
- fix missing interp_args for language_version()
- add missing run_cmd_ctx_destroy
2023-10-19 22:34:37 -04:00
Stone Tickle
b102e40d5f
tests: add simple python test to keep track of progress 2023-10-19 22:33:55 -04:00
Stone Tickle
1348de5415
add copyright 2023-10-14 22:13:11 -04:00
Filipe Laíns
dddd4476dd
func/str: align str.substring out of bounds behavior with Meson
This is currently undefined behavior, but users are relying on it, so
let's align ourselves with Meson.

See https://github.com/mesonbuild/meson/issues/12370

Signed-off-by: Filipe Laíns <lains@riseup.net>
2023-10-14 21:53:51 -04:00
Seedo Paul
7e3dc9908a
mark 'nasm/2 asm language' as failing on non x86
Signed-off-by: Seedo Paul <seedoeldhopaul@gmail.com>
2023-10-08 07:16:33 -04:00
Stone Tickle
381cedd0d2
update install check scripts 2023-10-03 13:35:26 -04:00
Stone Tickle
5de4d811b7
implement declare_dependency(objects:) 2023-10-03 13:35:25 -04:00
Stone Tickle
55ad6a9f16
update tests to 1.1.1 2023-10-03 13:35:20 -04:00
Stone Tickle
e98903dcdf
comment out pthread filtering from asm test
This behavior is an ugly hack in meson, and not documented.  It is also
trivially avoidable at the user level.  Based on this, I'm not going to
add it to muon for now at least.
2023-04-10 07:17:00 -04:00
Stone Tickle
43b38b73e4
update tests to meson 1.0.1 2023-04-10 06:23:03 -04:00
Stone Tickle
e59603b833
implement asm language 2023-01-14 21:10:02 -05:00
Stone Tickle
4d638b0f6c
update test check files 2023-01-14 21:10:02 -05:00
Stone Tickle
a31e229660
add new tests to project tests 2023-01-14 21:10:02 -05:00
Stone Tickle
98dc478edd
fix test 256 2023-01-14 21:10:01 -05:00
Stone Tickle
db3eaefbe1
update tests to 0.64 2023-01-14 21:09:58 -05:00
Stone Tickle
5362fa8b51
fix signature of thread entrypoint function 2022-12-17 20:23:59 -05:00
Stone Tickle
167c11c224
remove leftover p() invocations from tests 2022-12-17 16:33:46 -05:00
Stone Tickle
e67083d2e5
filter project tests without python
This will allow us to safely run project tests even when python isn't
installed.
2022-11-16 12:27:58 -05:00
Stone Tickle
6e7439660f
run muon fmt 2022-11-16 11:53:37 -05:00
Stone Tickle
4298aa2011
make muon reuse compliant
https://reuse.software
2022-10-25 10:54:31 -04:00
Stone Tickle
2021ab4aa1
fix compiler cache error result
- set the cache key earlier so that error returns have a key to cache
  the erroneous result with
- some returns must happen before the key is built, in which case we
  cannot cache the result, so just skip it
2022-10-06 21:12:21 -04:00
Stone Tickle
c97bf68a92
tap test support part 2 2022-10-04 20:30:00 -04:00
Stone Tickle
43a1691c38
add a simple test_setup for valgrind 2022-09-29 14:36:07 -04:00
Stone Tickle
15d588c050
support test setups and timeout 2022-09-29 10:44:35 -04:00
Stone Tickle
768302c35b
comment out test depending on dependency('boost') 2022-09-21 07:02:36 -04:00
Stone Tickle
3e179876c1
implement sourceset module 2022-09-16 20:18:38 -04:00
Stone Tickle
905f411d16
implement keyval module 2022-09-12 14:11:22 -04:00
Stone Tickle
75440d8b96
joining a path to '' appends a path separator
Some meson.builds intentionally do path / '' to add a '/' to the end of
path.  muon would end up stripping the trailing path separator in
path_normalize, so path / '' was a no-op.  Allow the meson behavior by
explicitly appending the '/' with path_add_suffix.
2022-08-12 19:50:37 -05:00
Stone Tickle
6b2758d39a
implement add_project_dependencies 2022-08-12 12:53:13 -05:00
Stone Tickle
664760ea4f
install refactor
- separate install functionality to install.c and
  functions/kernel/install.c
- remove specialized install functions that are only used in 1 place
- implement preserve_path for push_install_targets
2022-08-12 08:01:05 -05:00
Stone Tickle
bca734ec2a
update tests to 3fbcff1c 2022-08-11 14:36:51 -05:00
Stone Tickle
cda4db39f0
use internal samu in tests if enabled 2022-07-14 19:14:54 -05:00