Skip to content

Update lockfile api for package source #1266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 11, 2023
Merged

Update lockfile api for package source #1266

merged 2 commits into from
Jul 11, 2023

Conversation

LucilleH
Copy link
Collaborator

Summary

Update lockfile api for package source as suggested in #1264 (comment)

How was it tested?

devbox run build
devbox update

@LucilleH LucilleH requested a review from mikeland73 July 11, 2023 18:39
@@ -403,7 +403,12 @@ func (p *Package) Versioned() string {
}

func (p *Package) IsLegacy() bool {
return p.isDevboxPackage() && !p.isVersioned() && p.lockfile.Source(p.Raw) == ""
var packageSource = ""
if p.lockfile.Get(p.Raw) != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

golang hack

in lock package:

func (p *Package) GetSource() string {
  if p == nil {
    return ""
  }
  return p.Source
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. I pulled package out into a separate file for the above as well

@LucilleH LucilleH force-pushed the lucille--lockfile-api branch from 0f76063 to 3ea4c16 Compare July 11, 2023 18:42
@LucilleH LucilleH merged commit 89b6055 into main Jul 11, 2023
@LucilleH LucilleH deleted the lucille--lockfile-api branch July 11, 2023 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants