Added CHANGELOG entry for 0.3.0.0 version, added simple error when 'app' is missing.

This commit is contained in:
Martin Sosic 2022-02-04 11:51:58 +01:00
parent c2f9eff3b8
commit f59b432269
3 changed files with 29 additions and 1 deletions

View File

@ -1,3 +1,23 @@
# Changelog
## v0.3.0.0 (2022/02/04)
### [BREAKING CHANGE] New Wasp-lang syntax!
Mostly it is very similar to what it was before, with some following bigger changes:
- `auth`, `dependencies`, and couple of other "singleton" delcarations now became part of `app` declaration.
- All declarations now need to have name, including `route`.
- `route` has different syntax.
- `dependencies` have different syntax.
For exact details about new syntax, check https://wasp-lang.dev/docs/language/syntax .
### Various improvements
- Better compiler error messages.
- Nicer CLI output.
- Added delay on recompilation to avoid redundant recompiling.
- Added `onAuthSucceededRedirectTo` field in `app`.
- and more!
## Unreleased changes

View File

@ -298,6 +298,8 @@ If commit is tagged with tag starting with `v`, github draft release is created
If you put `[skip ci]` in commit message, that commit will be ignored by Github Actions.
We also wrote a `new-release` script which you can use to help you with creating new release: you need to provide it with new version (`./new-release 0.3.0`) and it will update the version in package.yaml, commit it, push it, and will also create appropriate tag and push it, therefore triggering CI to create new release on Github.
NOTE: If building of your commit is suddenly taking much longer time, it might be connected with cache on Github Actions.
If it happens just once every so it is probably nothing to worry about. If it happens consistently, we should look into it.

View File

@ -68,7 +68,13 @@ getDecls = takeDecls . decls
-- validates AppSpec and returns it wrapped with `Validated`,
-- I created a github issue for it: https://github.com/wasp-lang/wasp/issues/425 .
getApp :: AppSpec -> (String, App)
getApp spec = head $ takeDecls @App (decls spec)
getApp spec = case takeDecls @App (decls spec) of
[app] -> app
apps ->
error $
"Compiler error: expected exactly 1 'app' declaration in your wasp code, but you have "
++ show (length apps)
++ "!"
getQueries :: AppSpec -> [(String, Query)]
getQueries spec = takeDecls @Query (decls spec)