Mason works for one project but not for another

My Factorial project https://github.com/russel/Factorial/tree/master/Chapel seems to work fine:

|> mason clean
578 lynet:~/Progs/Applications/Factorial/Chapel (git:master)
|> mason test
Skipping registry update since no dependency found in manifest file.

----------------------------------------------------------------------
Ran 2 tests in 11.393 seconds

OK (passed = 2 )

However my Fibonacci project https://github.com/russel/Fibonacci/tree/master/Chapel fails to build:

|> mason test
./MasonUpdate.chpl:90: error: halt reached - argument to ! is nil

I can however guarantee that the code is good:

|> scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
chpl -o Fibonacci_Test --main-module Fibonacci_Test src/Fibonacci.chpl test/Fibonacci_Test.chpl
./Fibonacci_Test
positive_arguments()
Flavour: OK
======================================================================
----------------------------------------------------------------------
sequence_positive_arguments()
Flavour: OK
======================================================================
----------------------------------------------------------------------
negative_arguments()
Flavour: OK
======================================================================
----------------------------------------------------------------------
sequence_negative_arguments()
Flavour: OK
======================================================================
----------------------------------------------------------------------
scons: done building targets.

@Russel - Thanks for reporting.

Just to confirm, are you using Chapel 1.22.1 or 1.23.0 for this test?

I noticed the Fibonacci test does not have a Mason.toml which may be the cause of this issue. Can you try running mason init in the package directory to generate a Mason.toml?

I was not able to reproduce the error you are getting by running mason test in Fibonacci/Chapel on the master branch of your repository with Chapel 1.22.1 or 1.23.0.

Mason 1.23.0 built from source via the LinuxBrew formula.

I had a Mason.toml, it just wasn’t committed to the repository. Sorry about that. Should be fixed now.

Problem remains. :frowning:

Looks like this is a bug in mason that triggers when no [dependencies] table exists. You can work around it for now by adding an empty [dependencies] section to your Mason.toml.

I can file an issue on this. Thanks for reporting.

1 Like

@ben-albrecht Seems to be the issue. Thanks for spotting that. As you say add the dependencies paragraph and it all works. :slight_smile:

  |> mason test
Skipping registry update since no dependency found in manifest file.

----------------------------------------------------------------------
Ran 4 tests in 11.456 seconds

OK (passed = 4 )
1 Like

FWIW, this bug is now fixed on master: https://github.com/chapel-lang/chapel/pull/16602

1 Like

As the LinuxBrew formula does not seem to allow installing from HEAD, I’ll have to wait for the next release (1.23.1 perhaps?).