Skip to content
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

bake: move merge logic to an hcl package and add tests #2831

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

crazy-max
Copy link
Member

follow-up #2758 (comment)

@crazy-max crazy-max added this to the v0.20.0 milestone Dec 2, 2024
@crazy-max crazy-max marked this pull request as ready for review December 2, 2024 10:08
@crazy-max crazy-max changed the title bake: move merge logic to gohcl package and add tests bake: move merge logic to an hcl package and add tests Dec 2, 2024
@@ -1,9 +1,7 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

// Forked from https://github.com/hashicorp/hcl/blob/4679383728fe331fc8a6b46036a27b8f818d9bc0/merged.go
Copy link
Member

Choose a reason for hiding this comment

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

Should this be kept?

Copy link
Member Author

Choose a reason for hiding this comment

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

Don't think we should as this now has the same hierarchy as upstream repo

Copy link
Member Author

Choose a reason for hiding this comment

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

But maybe we could have a README in this package

@@ -16,6 +16,7 @@ import (

composecli "github.com/compose-spec/compose-go/v2/cli"
"github.com/docker/buildx/bake/hclparser"
hclalt "github.com/docker/buildx/bake/hclparser/hcl"
Copy link
Member

Choose a reason for hiding this comment

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

If this package is only to be used internally, and not directly used by others, it's worth considering moving it to an internal/ package.

Copy link
Member Author

Choose a reason for hiding this comment

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

Buildx is just a client and I don't really like the internal pattern but I don't mind if we want to move that there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants