Skip to content

Commit

Permalink
Deprecates Version field on BuildPlanRequirement and BuildpackPlanEntry
Browse files Browse the repository at this point in the history
These fields were deprecated as part of Buildpack Spec RFC0043.
All buildpacks that make use of these fields should instead switch to
using the Metadata field to store/retrieve version information.
This field will be removed at some point in the future.
  • Loading branch information
Ryan Moran authored and joshzarrabi committed Aug 21, 2020
1 parent 02e091f commit 9cbdfda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion build.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,13 @@ type BuildpackPlanEntry struct {

// Version if the version contraint that defines what would be an acceptable
// dependency provided by the buildpack.
//
// Deprecated: Retrieve version information from Metadata instead.
Version string `toml:"version"`

// Metadata is an unspecified field allowing buildpacks to communicate extra
// details about their requirement. Examples of this type of metadata might
// include details about what source was used to decide the Version
// include details about what source was used to decide the version
// constraint for a requirement.
Metadata map[string]interface{} `toml:"metadata"`
}
Expand Down
4 changes: 3 additions & 1 deletion detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,13 @@ type BuildPlanRequirement struct {

// Version allows a requirement to include a constraint describing what
// versions of the dependency are considered acceptable.
//
// Deprecated: Store version information in Metadata instead.
Version string `toml:"version"`

// Metadata is an unspecified field allowing buildpacks to communicate extra
// details about their requirement. Examples of this type of metadata might
// include details about what source was used to decide the Version
// include details about what source was used to decide the version
// constraint for a requirement.
Metadata interface{} `toml:"metadata"`
}
Expand Down

0 comments on commit 9cbdfda

Please sign in to comment.