Skip to content

Commit

Permalink
Add deprecation notices for dep, gb, glide, godep, govendor (#569)
Browse files Browse the repository at this point in the history
* Add deprecation notices for dep, gb, glide, godep, govendor

Signed-off-by: Josh W Lewis <[email protected]>

* Add test assertions for deprecation messages

* Add changelog entry for tool deprecation

* Drop extra newline

Co-authored-by: David Zülke <[email protected]>

* Add extra newline

Co-authored-by: David Zülke <[email protected]>

---------

Signed-off-by: Josh W Lewis <[email protected]>
Co-authored-by: David Zülke <[email protected]>
  • Loading branch information
joshwlewis and dzuelke authored Sep 3, 2024
1 parent 8f2a960 commit d80253c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

* Deprecate support for unmaintained dependency managers: `dep`, `gb`, `glide`, `godep` and `govendor`.
Support for these dependency managers will be removed on March 1, 2025.
Apps using these dependency managers should migrate to Go modules as soon as possible.
Learn more about using Go modules on Heroku [here](https://devcenter.heroku.com/articles/go-modules).
* Add support for wwwauth[] git credential arguments

## [v195] - 2024-08-13
Expand Down
12 changes: 12 additions & 0 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,13 @@ warnPackageSpecOverride() {
fi
}

warnDeprecatedTool() {
local tool=$1
warn "This application is using ${tool}, but ${tool} is no longer maintained."
warn "${tool} support on Heroku is deprecated and will be removed on March 1, 2025."
warn "Please migrate to Go modules. Learn more about Go modules on Heroku here: https://devcenter.heroku.com/articles/go-modules."
}

# Sets up GOPATH (and posibly other GO* env vars) and returns the location of
# the source code as $src. The output of this function is meant to be eval'd'
setupGOPATH() {
Expand Down Expand Up @@ -708,6 +715,11 @@ if needConcurrency ${ver}; then
cp $buildpack/vendor/concurrency.sh $build/.profile.d/
fi

# dep, gb, glide, godep, govendor are all unmaintained.
if [ "${TOOL}" != "gomodules" ]; then
warnDeprecatedTool "$TOOL"
fi

t="${build}/.heroku/go"
mkdir -p "${t}"
t="${t}/.meta"
Expand Down
10 changes: 10 additions & 0 deletions test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@ testDepGoVersion() {
assertCaptured "Fetching any unsaved dependencies (dep ensure)"
assertCaptured "Running: go install -v -tags heroku ."
assertCaptured "github.com/heroku/fixture"
assertCaptured "This application is using dep, but dep is no longer maintained."

assertCapturedSuccess
assertCompiledBinaryExists
}
Expand Down Expand Up @@ -867,6 +869,8 @@ testGodepBasicGo14WithGOVERSIONOverride() {
compile
assertCaptured "Installing go1.6"
assertCaptured "Using \$GOVERSION override."
assertCaptured "This application is using godep, but godep is no longer maintained."

assertCapturedSuccess
assertCompiledBinaryExists
assertBuildDirFileDoesNotExist ".profile.d/concurrency.sh"
Expand Down Expand Up @@ -975,6 +979,8 @@ testGlideBasic() {
assertCaptured "Fetching any unsaved dependencies (glide install)"
assertCaptured "Running: go install -v -tags heroku ."
assertCaptured "github.com/heroku/fixture"
assertCaptured "This application is using glide, but glide is no longer maintained."

assertCapturedSuccess
assertCompiledBinaryExists
}
Expand Down Expand Up @@ -1234,6 +1240,8 @@ testGBBasic() {
assertCaptured "Running: gb build -tags heroku"
assertCaptured "cmd/fixture"
assertCaptured "Post Compile Cleanup"
assertCaptured "This application is using gb, but gb is no longer maintained."

assertCapturedSuccess
assertCompiledBinaryExists
}
Expand Down Expand Up @@ -1373,6 +1381,8 @@ testGovendorBasic() {
assertCaptured "Running: go install -v -tags heroku ."
assertCaptured "Installing package '.' (default)"
assertCaptured "github.com/heroku/fixture"
assertCaptured "This application is using govendor, but govendor is no longer maintained."

assertCapturedSuccess
assertCompiledBinaryExists
}
Expand Down

0 comments on commit d80253c

Please sign in to comment.