inkytonik / cooma

The Cooma project is investigating secure programming language design based on fine-grained object capabilities.
Mozilla Public License 2.0
3 stars 2 forks source link

Feature/errors #42

Closed nhweston closed 3 years ago

nhweston commented 3 years ago

This PR introduces Cooma runtime exceptions. These exceptions and utility methods for throwing them are defined in ./commons/…/scala/…/CoomaException.scala. The error value has been removed, as have all calls to sys.error in interpreter code.

Interpreter entry points are wrapped in a Try. If a CoomaException is thrown, the error message is output. CoomaException is the only exception an interpreter is allowed to throw. If it throw any other exception, this is considered to be a bug in Cooma and an error message defined in CoomaException.getUnhandledMessage is output, along with an internal stack trace.

nhweston commented 3 years ago

Looks like it can't get the ScalaCheck library?

inkytonik commented 3 years ago

It seems to be this dependence which is failing:

"wolfendale" %% "scalacheck-gen-regexp" % "0.1.2"

My guess is that it used to be published on bintray. They recently stopped hosting some Scala stuff so that might explain why it's not working now. It works on our machines because we've previously downloaded the jar etc.

According to Maven central version 0.1.3 of that library is published there, so can you try bumping the version and see if that fixes it on GH?

nhweston commented 3 years ago

This works:

"io.github.wolfendale" %% "scalacheck-gen-regexp" % "0.1.3"
nhweston commented 3 years ago

Getting some failing tests in FileIoTests after uncommenting.

nhweston commented 3 years ago

Actually, it seems these tests are failing regardless on my local? Very strange.

nhweston commented 3 years ago

@inkytonik Ready to merge.