Compare commits

..

2 Commits

Author SHA1 Message Date
Steve
e2480171e5 Merge pull request #214 from revel/master
v1.1.1 hotfix sync
2022-04-12 15:20:35 -07:00
Brenden Soares
8162ef3ed6 develop v1.2.0-dev 2022-04-12 13:37:12 -07:00
4 changed files with 8 additions and 28 deletions

2
.vscode/tasks.json vendored
View File

@@ -6,7 +6,7 @@
{ {
"label": "Clean-Test-Project", "label": "Clean-Test-Project",
"type": "shell", "type": "shell",
"command": "rm -rf ${workspaceRoot}/.temp/revel/reveltest" "command": "rm -rf ${workspaceRoot}/.temp/revel/testproject"
}, },
{ {
"label": "Update Go Mod", "label": "Update Go Mod",

9
go.mod
View File

@@ -2,11 +2,6 @@ module github.com/revel/cmd
go 1.17 go 1.17
retract (
v1.1.0 // v1.1.0-1.1.1 are failed releases
v1.1.1
)
require ( require (
github.com/BurntSushi/toml v1.0.0 // indirect github.com/BurntSushi/toml v1.0.0 // indirect
github.com/agtorre/gocolorize v1.0.0 github.com/agtorre/gocolorize v1.0.0
@@ -20,10 +15,10 @@ require (
github.com/myesui/uuid v1.0.0 // indirect github.com/myesui/uuid v1.0.0 // indirect
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1
github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/revel/config v1.1.0 github.com/revel/config v1.0.0
github.com/revel/log15 v2.11.20+incompatible github.com/revel/log15 v2.11.20+incompatible
github.com/revel/pathtree v0.0.0-20140121041023-41257a1839e9 // indirect github.com/revel/pathtree v0.0.0-20140121041023-41257a1839e9 // indirect
github.com/revel/revel v1.1.0 github.com/revel/revel v1.0.0
github.com/stretchr/testify v1.7.0 github.com/stretchr/testify v1.7.0
github.com/twinj/uuid v1.0.0 // indirect github.com/twinj/uuid v1.0.0 // indirect
github.com/xeonx/timeago v1.0.0-rc4 // indirect github.com/xeonx/timeago v1.0.0-rc4 // indirect

View File

@@ -224,25 +224,10 @@ func Build(c *model.CommandConfig, paths *model.RevelContainer) (_ *App, err err
utils.Logger.Info("Build failed no missing imports", "message", stOutput) utils.Logger.Info("Build failed no missing imports", "message", stOutput)
return nil, newCompileError(paths, output) return nil, newCompileError(paths, output)
} }
// Reduce the matches down to unique ones
missedPkgs := []string{}
for _, match := range matches {
found := false
for _, pkgName := range missedPkgs {
if match[1] == pkgName {
found = true
break
}
}
if !found {
missedPkgs = append(missedPkgs, match[1])
}
}
utils.Logger.Warn("Detected missing packages, importing them", "packages", len(matches)) utils.Logger.Warn("Detected missing packages, importing them", "packages", len(matches))
for _, pkgName := range missedPkgs { for _, match := range matches {
// Ensure we haven't already tried to go get it. // Ensure we haven't already tried to go get it.
pkgName := match[1]
utils.Logger.Info("Trying to import ", "package", pkgName) utils.Logger.Info("Trying to import ", "package", pkgName)
if _, alreadyTried := gotten[pkgName]; alreadyTried { if _, alreadyTried := gotten[pkgName]; alreadyTried {
utils.Logger.Error("Failed to import ", "package", pkgName) utils.Logger.Error("Failed to import ", "package", pkgName)
@@ -250,7 +235,7 @@ func Build(c *model.CommandConfig, paths *model.RevelContainer) (_ *App, err err
} }
gotten[pkgName] = struct{}{} gotten[pkgName] = struct{}{}
if err := c.PackageResolver(pkgName); err != nil { if err := c.PackageResolver(pkgName); err != nil {
// panic("failed to resolve") panic("failed to resolve")
utils.Logger.Error("Unable to resolve package", "package", pkgName, "error", err) utils.Logger.Error("Unable to resolve package", "package", pkgName, "error", err)
return nil, newCompileError(paths, []byte(err.Error())) return nil, newCompileError(paths, []byte(err.Error()))
} }

View File

@@ -6,10 +6,10 @@ package cmd
const ( const (
// Version current Revel version // Version current Revel version
Version = "1.1.2" Version = "1.2.0-dev"
// BuildDate latest commit/release date // BuildDate latest commit/release date
BuildDate = "2022-04-12" BuildDate = "2022-04-11"
// MinimumGoVersion minimum required Go version for Revel // MinimumGoVersion minimum required Go version for Revel
MinimumGoVersion = ">= go1.17" MinimumGoVersion = ">= go1.17"