this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

internal/mod/modload: remove dead language.version check in CheckTidy

modfile.ParseNonStrict already requires the field to be set,
so by the time we reach this stage of CheckTidy,
we will have already failed if language.field is missing.

This seems like a remnant from the refactor to require language.version
in https://cuelang.org/cl/1193275, where this old check was left behind.

No test changes because we already have tests that cover what happens
when `cue mod tidy` is run on a module without language.version,
and their behavior is unchanged due to the reason above.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I1a2c69e95823162d81c24a2fa73c87b24f5fe355
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1195720
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Paul Jolly <paul@myitcv.io>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>

-6
-6
internal/mod/modload/tidy.go
··· 62 62 if err != nil { 63 63 return nil, err 64 64 } 65 - if checkTidy { 66 - // This is the cheapest check, so do it first. 67 - if mf.Language == nil || mf.Language.Version == "" { 68 - return nil, fmt.Errorf("no language version found in cue.mod/module.cue") 69 - } 70 - } 71 65 // TODO check that module path is well formed etc 72 66 origRs := modrequirements.NewRequirements(mf.Module, reg, mf.DepVersions(), mf.DefaultMajorVersions()) 73 67 rootPkgPaths, err := modimports.AllImports(modimports.AllModuleFiles(fsys, modRoot))