# Mason works for one project but not for another

**URL:** <https://chapel.discourse.group/t/mason-works-for-one-project-but-not-for-another/1181>\
**Category:** Users\
**Created:** [October 17, 2020, 1:55pm UTC](https://chapel.discourse.group/t/mason-works-for-one-project-but-not-for-another/1181 "2020-10-17T13:55:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Russel](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/russel/32/52_2.png) [@Russel](https://chapel.discourse.group/u/Russel)\
**Post date:** [October 17, 2020, 1:55pm UTC](https://chapel.discourse.group/t/mason-works-for-one-project-but-not-for-another/1181/1 "2020-10-17T13:55:02Z")

</div>

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

```auto
|> 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](https://github.com/russel/Fibonacci/tree/master/Chapel) fails to build:

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

```

I can however guarantee that the code is good:

```auto
|> 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.

```

---

<div class="post-metadata">

**Author:** ![ben-albrecht](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@ben-albrecht](https://chapel.discourse.group/u/ben-albrecht)\
**Post date:** [October 19, 2020, 5:35pm UTC](https://chapel.discourse.group/t/mason-works-for-one-project-but-not-for-another/1181/2 "2020-10-19T17:35:40Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Russel](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/russel/32/52_2.png) [@Russel](https://chapel.discourse.group/u/Russel)\
**Post date:** [October 19, 2020, 5:57pm UTC](https://chapel.discourse.group/t/mason-works-for-one-project-but-not-for-another/1181/3 "2020-10-19T17:57:30Z")

</div>

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. ☹

---

<div class="post-metadata">

**Author:** ![ben-albrecht](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@ben-albrecht](https://chapel.discourse.group/u/ben-albrecht)\
**Post date:** [October 19, 2020, 6:15pm UTC](https://chapel.discourse.group/t/mason-works-for-one-project-but-not-for-another/1181/4 "2020-10-19T18:15:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Russel](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/russel/32/52_2.png) [@Russel](https://chapel.discourse.group/u/Russel)\
**Post date:** [October 19, 2020, 6:20pm UTC](https://chapel.discourse.group/t/mason-works-for-one-project-but-not-for-another/1181/5 "2020-10-19T18:20:10Z")

</div>

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

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

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

OK (passed = 4 )

```

---

<div class="post-metadata">

**Author:** ![ben-albrecht](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@ben-albrecht](https://chapel.discourse.group/u/ben-albrecht)\
**Post date:** [October 20, 2020, 5:31pm UTC](https://chapel.discourse.group/t/mason-works-for-one-project-but-not-for-another/1181/6 "2020-10-20T17:31:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Russel](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/russel/32/52_2.png) [@Russel](https://chapel.discourse.group/u/Russel)\
**Post date:** [October 20, 2020, 5:33pm UTC](https://chapel.discourse.group/t/mason-works-for-one-project-but-not-for-another/1181/7 "2020-10-20T17:33:14Z")

</div>

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?).
