internal/cueexperiment: flip modules experiment flag default
This change enables the modules experiment by default.
This will cause CUE code to fail if there is no language
version in the module.cue file, amongst other things.
The experiment can be disabled by setting
CUE_EXPERIMENT=modules=0
Many of the unit tests need to be changed in order to
add the now-mandatory language.version field.
Some error messages have now changed.
Some logic in the `cue fmt` command that relies on seeing
a `load.PackageError` required the respective code inside
`cue/load` to produce that error, which also changes some
error messages.
The `cue mod fix` command is now available to make it
it more straightforward to migrate.
The module path in encoding/gocode/testdata/cue.mod/module.cue
has been changed to match the modules-enabled default,
otherwise the generation code fails with an error about a mismatched
module path.
Fixes #3127.
Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: I7c384c785eac6203966460703283ecfa2d9f0447
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194664
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>