ceylon.ast 1.2.2
ceylon.ast 1.2.2
Changes from the previous version (1.2.1):
- Several changes have been made to
Editor
in an effort to improve performance:- The
edit
methods for abstract node classes and precedence aliases are no longerdefault
. They are usually not called anyways, sinceEditor
satisfiesImmediateNarrowingTransformer
, so if you overwrote them for whatever reason, this was almost certainly a bug. See #112. - The
edit
methods for leaf nodes (that is, nodes without child nodes) have been changed to skip thecopy
call and directly return the edited node, since for these nodescopy
is a no-op anyways. See #111. - The method
editNode
is added to provide a heuristic whether a given node will be changed by the editor or not. IfeditNode
returnsfalse
, the default implementations of theedit
methods for non-leaf nodes will directly return the edited node without callingcopy
or editing child nodes. By default,editNode
always returnstrue
, so the behavior is the same as before. But editors that seek to improve performance can overwrite it with some heuristic to avoid unnecessary edits in some cases. See #111.
- The
- The
ClassDec
conversion from RedHat AST to ceylon.ast did not accept lowercase identifiers, which are valid in declarations that refer to the class of an object. See #113.
The .car
files for this release have been made reproducible using a fork of Debian’s strip-nondeterminism
program.
The following script, on a fresh Arch Linux system, should produce the exact same binary:
#!/bin/bash
version=1.2.2
project=ceylon.ast
modules=(ceylon.ast.{core,create,redhat,samples})
repo=https://modules.ceylon-lang.org/repo/1
timestamp=1460140000
# install dependencies
pacman -S --noconfirm \
git \
jdk8-openjdk \
wget \
curl \
apache-ant \
zip \
unzip \
perl-archive-zip \
python
# install Ceylon
cd /opt
wget https://downloads.ceylon-lang.org/cli/ceylon-$version.zip
unzip ceylon-$version.zip
export PATH="$PATH:/opt/ceylon-$version/bin"
# build project
git clone https://github.com/ceylon/$project
cd $project
git checkout $version
sed -i "s|../ceylon/dist/dist|/opt/ceylon-$version|" build.properties
ant compile
cd ..
# strip nondeterminism
git clone https://github.com/lucaswerkmeister/strip-nondeterminism
cd strip-nondeterminism/lib
for module in "${modules[@]}"; do
car="../../$project/modules/${module//\.//}/$version/$module-$version.car"
../bin/strip-nondeterminism -t car -T $timestamp "$car"
echo -n $(sha1sum "$car" | cut -f1 -d' ') > "$car".sha1
done
# compare checksums
for module in "${modules[@]}"; do
echo
echo "$module"
cat "../../$project/modules/${module//\.//}/$version/$module-$version.car.sha1"; echo
curl "$repo/${module//\.//}/$version/$module-$version.car.sha1"; echo
done
(This is almost certainly not specific to Arch Linux, but that’s where it was tested. On other systems, adjust the pacman -S
line to use the correct package manager, or remove it entirely if the packages are already installed.)