wren-lang / wren

The Wren Programming Language. Wren is a small, fast, class-based concurrent scripting language.
http://wren.io
MIT License
6.9k stars 552 forks source link

Meson build file #915

Open KingDuckZ opened 3 years ago

KingDuckZ commented 3 years ago

Hey wren people, I'm maintaining a small meson script as part of my c++ wren wrapper project. I updated it to work with wren 0.3.0 just now, and I can make whatever change to make sure it works with the latest commit if you're interested in adding that directly into wren? As visible from the meson_options.txt file it supports optional unit test compilation and optional meta and random modules. Previous version also supported optional cli, but I see wren-cli's been split into a separate repository now, so I removed that option.

As an aside, when I run ninja test I get some failures in the unit tests (assuming I'm running the unit test program correctly), is that something you're aware of? Namely it's call_calls_foreign, get_variable, call_wren_call_root unexpected pass, resolution, new_vm, handle, error, lists, user_data, slots, foreign_class, api_call, api_foreign_method, module, get_module_variables.

Ok:                 454
Expected Fail:      371
Fail:               14
Unexpected Pass:    1
Skipped:            0
Timeout:            0

In order to detect which tests are expected to fail, I wrote a python script that searches for an "expected fail" regex in each .wren file. This is brittle and very slow, would it be possible to have that information in the filename itself as a convention? For example my_good_test.wren and my_bad_test.fails.wren.

KingDuckZ commented 3 years ago

Is it possible to get some feedback on this please?

mhermier commented 3 years ago

About the failures it has to be expected, there are some combination of header options that not checked frequently. So in particular if you are testing the garbage torture test, you'll see potentially a good number of them and times out. Some are unchecked returns values, race condition against ourself...

KingDuckZ commented 3 years ago

Thanks for the reply. Failures are the ones I listed already. So wouldn't the project benefit from making tests easier to run? If you try my meson.build you'll be able to run all tests with ninja test.

mhermier commented 3 years ago

I have no control on the build system, so wait for an official answer of @ruby0x1