Skip to content

Commit

Permalink
Move vnext migration guide to 2.5.10, we forgot to do that as part of…
Browse files Browse the repository at this point in the history
… the release
  • Loading branch information
Apanatshka committed Oct 28, 2020
1 parent 7f827bf commit ee30eeb
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 42 deletions.
37 changes: 36 additions & 1 deletion source/release/migrate/2.5.10.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,39 @@

# Spoofax 2.5.10 Migration Guide

A change in Statix need migration for users of the Startego API.
A change in Statix need migration for users of the Stratego API.

## SDF3
In an upcoming version of Spoofax 2 it will be required to properly declare sorts
in SDF3 syntax definitions. Sorts for which context-free rules are defined
should be declared in a `context-free sorts` block:

context-free sorts
Stmt Expr

> *Note*: For backward compatibility, sorts declared in a plain `sorts` block
> are treated as context-free sorts. So this is equivalent and also fine:
>
> sorts
> Stmt Expr
>
Sorts for which lexical rules are defined should be declared in a
`lexical sorts` block:

lexical sorts
ID INT STRING

> *Note*: Lexical sorts are not supported in combination with ``sdf2table: c``.
## Typesmart
If your `metaborg.yaml` file still contains mention of Typesmart (e.g. `debug: typesmart: false`), you can remove it. See the release notes for why Typesmart support was removed.

## Stratego
Spoofax languages used to always generate `target/metaborg/stratego-javastrat.jar` which contains the compiled Java code from `src/main/stratego`. Conditional on your settings in the `metaborg.yaml` file, your Stratego code would be turned into `target/metaborg/stratego.ctree` or `target/metaborg/stratego.jar` depending on whether you chose compilation or interpretation. As of this release, there is no longer a separate `stratego-javastrat.jar`. Instead `stratego.jar` is always generated and always contains at least the compiled Java code from `src/main/stratego`. If you choose compilation for your Stratego code, the compiled Stratego code is added to the `stratego.jar` file as was already the case originally.


**What you need to do:** Go to your `editor/main.esv` file and find the `provider: ...` lines (or search your other ESV files if it's not there). The line `provider: target/metaborg/stratego-javastrat.jar` should be replaced by `provider: target/metaborg/stratego.jar`. If you already have a `provider: target/metaborg/stratego.jar`, one is enough and you can remove the `stratego-javastrat.jar` provider directive entirely.

## Statix

Expand All @@ -17,3 +49,6 @@ one should now use:

stx-get-ast-type(|a)

## SPT
In SPT, `parse succeeds` tests will now fail when the input parses ambiguously.
If this is intended, use `parse ambiguous` instead.
42 changes: 1 addition & 41 deletions source/release/migrate/vnext.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,4 @@

# Spoofax vNext Migration Guide

This is a stub for the migration guide of Spoofax vNext.


## SDF3
In an upcoming version of Spoofax 2 it will be required to properly declare sorts
in SDF3 syntax definitions. Sorts for which context-free rules are defined
should be declared in a `context-free sorts` block:

context-free sorts
Stmt Expr

> *Note*: For backward compatibility, sorts declared in a plain `sorts` block
> are treated as context-free sorts. So this is equivalent and also fine:
>
> sorts
> Stmt Expr
>
Sorts for which lexical rules are defined should be declared in a
`lexical sorts` block:

lexical sorts
ID INT STRING

> *Note*: Lexical sorts are not supported in combination with ``sdf2table: c``.

## Typesmart
If your `metaborg.yaml` file still contains mention of Typesmart (e.g. `debug: typesmart: false`), you can remove it. See the release notes for why Typesmart support was removed.


## Stratego
Spoofax languages used to always generate `target/metaborg/stratego-javastrat.jar` which contains the compiled Java code from `src/main/stratego`. Conditional on your settings in the `metaborg.yaml` file, your Stratego code would be turned into `target/metaborg/stratego.ctree` or `target/metaborg/stratego.jar` depending on whether you chose compilation or interpretation. As of this release, there is no longer a separate `stratego-javastrat.jar`. Instead `stratego.jar` is always generated and always contains at least the compiled Java code from `src/main/stratego`. If you choose compilation for your Stratego code, the compiled Stratego code is added to the `stratego.jar` file as was already the case originally.


**What you need to do:** Go to your `editor/main.esv` file and find the `provider: ...` lines (or search your other ESV files if it's not there). The line `provider: target/metaborg/stratego-javastrat.jar` should be replaced by `provider: target/metaborg/stratego.jar`. If you already have a `provider: target/metaborg/stratego.jar`, one is enough and you can remove the `stratego-javastrat.jar` provider directive entirely.


## SPT
In SPT, `parse succeeds` tests will now fail when the input parses ambiguously.
If this is intended, use `parse ambiguous` instead.
This is a stub for the migration guide of Spoofax vNext.

0 comments on commit ee30eeb

Please sign in to comment.