Skip to content

ceylon.ast 1.2.2

Compare
Choose a tag to compare
@lucaswerkmeister lucaswerkmeister released this 08 Apr 19:27
· 99 commits to master since this release
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 longer default. They are usually not called anyways, since Editor satisfies ImmediateNarrowingTransformer, 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 the copy call and directly return the edited node, since for these nodes copy 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. If editNode returns false, the default implementations of the edit methods for non-leaf nodes will directly return the edited node without calling copy or editing child nodes. By default, editNode always returns true, 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 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.)