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

Fix string does not match ~[]E error #5675

Merged
merged 2 commits into from
Aug 3, 2023

Conversation

hslatman
Copy link
Contributor

@hslatman hslatman commented Aug 3, 2023

Fixes #5674

@CLAassistant
Copy link

CLAassistant commented Aug 3, 2023

CLA assistant check
All committers have signed the CLA.

@mholt
Copy link
Member

mholt commented Aug 3, 2023

What is this exactly? I do not get this error, nor does our CI, and builds succeeded.

@hslatman
Copy link
Contributor Author

hslatman commented Aug 3, 2023

Yea, I was kind of surprised myself too.

I hit this error when building Caddy with one of my modules. Another person seems to have hit the same issue with a custom module: #5673

Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

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

Huh. Alrighty then.

LGTM. I'm not sure why we need the exp package here anyway. Thanks

@francislavoie
Copy link
Member

francislavoie commented Aug 3, 2023

Does the import need updating? (Run gofmt)

Oh nvm we still use Compact

@hslatman
Copy link
Contributor Author

hslatman commented Aug 3, 2023

Does the import need updating? (Run go mod tidy)

Doesn't look like it. Still one slices usage.

@mholt
Copy link
Member

mholt commented Aug 3, 2023

Weird that only this occurrence needs changing then.

As I do not get this error, nor does our CI, I'm trusting you on this 😊

@mholt mholt enabled auto-merge (squash) August 3, 2023 00:29
@mholt mholt added this to the v2.7.1 milestone Aug 3, 2023
@hslatman
Copy link
Contributor Author

hslatman commented Aug 3, 2023

Here's a reproducer on the playground: https://go.dev/play/p/NsaynrOjz9i

@mholt
Copy link
Member

mholt commented Aug 3, 2023

Is that using the same commit of x/exp that is in our go.mod? (Sorry, I would check myself, but I'm traveling/mobile and scrambling to get my laptop set up to tag a signed release.)

@francislavoie
Copy link
Member

francislavoie commented Aug 3, 2023

Oh, I guess it needs to be slices.Sort[[]string](s) i.e. with the []. Still don't understand why it didn't fail for us before though.

@hslatman
Copy link
Contributor Author

hslatman commented Aug 3, 2023

Oh, I guess it needs to be slices.Sort[[]string](s) i.e. with the []. Still don't understand why it didn't fail for us before though.

That does compile on the playground 🙂

@mholt mholt merged commit 4aa4f3a into caddyserver:master Aug 3, 2023
19 checks passed
@mholt
Copy link
Member

mholt commented Aug 3, 2023

If the playground always uses the latest commits, ours is not using the latest commit of x/exp. That might be the difference, somehow?

@hslatman
Copy link
Contributor Author

hslatman commented Aug 3, 2023

Maybe this commit is related: golang/go@0a48e5c

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

Successfully merging this pull request may close these issues.

Custom Caddy build with module relying on httpcaddyfile doesn't compile
4 participants