mirror of
https://github.com/corda/corda.git
synced 2025-01-29 15:43:55 +00:00
CORDA-2721: Update djvm check
documentation, and fix CLI tool installation. (#4865)
* CORDA-2721: Fix DJVM CLI installation and runtime scripts. * Update DJVM documentation to explain about `RuleViolationError`. * CORDA-2721: Add comment about constants.properties being parsed by DJVM CLI scripts.
This commit is contained in:
parent
9648b16ff1
commit
ec5cbc2971
@ -2,6 +2,8 @@
|
||||
# because some versions here need to be matched by app authors in
|
||||
# their own projects. So don't get fancy with syntax!
|
||||
|
||||
# It is also parsed by the scripts in djvm/shell/.
|
||||
|
||||
cordaVersion=5.0-SNAPSHOT
|
||||
gradlePluginsVersion=4.0.42
|
||||
kotlinVersion=1.2.71
|
||||
|
@ -3,7 +3,7 @@
|
||||
file="${BASH_SOURCE[0]}"
|
||||
linked_file="$(test -L "$file" && readlink "$file" || echo "$file")"
|
||||
base_dir="$(cd "$(dirname "$linked_file")/../" && pwd)"
|
||||
version="$(cat $base_dir/../build.gradle | sed -n 's/^[ ]*ext\.corda_release_version[ =]*"\([^"]*\)".*$/\1/p')"
|
||||
version="$(cat $base_dir/../constants.properties | sed -n 's/^[ ]*cordaVersion[ =]*\(.*\).*$/\1/p')"
|
||||
jar_file="$base_dir/cli/build/libs/corda-djvm-$version-cli.jar"
|
||||
|
||||
CLASSPATH="${CLASSPATH:-}"
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
file="${BASH_SOURCE[0]}"
|
||||
base_dir="$(cd "$(dirname "$file")/" && pwd)"
|
||||
version="$(cat $base_dir/../../build.gradle | sed -n 's/^[ ]*ext\.corda_release_version[ =]*"\([^"]*\)".*$/\1/p')"
|
||||
version="$(cat $base_dir/../../constants.properties | sed -n 's/^[ ]*cordaVersion[ =]*\(.*\).*$/\1/p')"
|
||||
|
||||
# Build DJVM module and CLI
|
||||
cd "$base_dir/.."
|
||||
|
@ -93,7 +93,9 @@ type's members. This is what controls things like ensuring that all methods impl
|
||||
and normalisation of synchronised methods.
|
||||
|
||||
Lastly, there is a set of emitters. These are used to instrument the byte code for cost accounting purposes, and also
|
||||
to inject code for checks that we want to perform at runtime or modifications to out-of-the-box behaviour.
|
||||
to inject code for checks that we want to perform at runtime or modifications to out-of-the-box behaviour. Many of
|
||||
these emitters will rewrite non-deterministic operations to throw ``RuleViolationError`` exceptions instead, which
|
||||
means that the ultimate proof that a function is *truly* deterministic is that it executes successfully inside the DJVM.
|
||||
|
||||
|
||||
Static Byte Code Analysis
|
||||
@ -342,7 +344,9 @@ The output should be pretty self-explanatory, but just to summarise:
|
||||
|
||||
Other commands to be aware of are:
|
||||
|
||||
* ``djvm check`` which allows you to perform the up-front static analysis without running the code.
|
||||
* ``djvm check`` which allows you to perform some up-front static analysis without running the code. However, be aware
|
||||
that the DJVM also transforms some non-deterministic operations into ``RuleViolationError`` exceptions. A successful
|
||||
``check`` therefore does *not* guarantee that the code will behave correctly at runtime.
|
||||
|
||||
* ``djvm inspect`` which allows you to inspect what byte code modifications will be applied to a class.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user