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

go install fails with undefined: strings.CutPrefix in encoder_lua.go #1755

Closed
aniketbhatnagar opened this issue Aug 11, 2023 · 3 comments
Closed
Labels

Comments

@aniketbhatnagar
Copy link

aniketbhatnagar commented Aug 11, 2023

Describe the bug
While installing yq using go install github.com/mikefarah/yq/v4@latest, the installation is failing with the following error:

.go/mod/github.com/mikefarah/yq/v4@v4.35.1/pkg/yqlib/encoder_lua.go:139:29: undefined: strings.CutPrefix
.go/mod/github.com/mikefarah/yq/v4@v4.35.1/pkg/yqlib/encoder_lua.go:237:29: undefined: strings.CutPrefix

Version of yq: 4.35.1
Operating system: linux
Installed via: go install

Input Yaml
N/A

Command
The command you ran: go install github.com/mikefarah/yq/v4@latest

Actual behavior
Installation fails

Expected behavior
Installation should be successful

Additional context
Add any other context about the problem here.

@WeberKuo
Copy link

Upgrading your golang version to v1.20 should fix the issue.

@aniketbhatnagar
Copy link
Author

ya that seems to fix it. Thanks

@Kavindu-Dodan
Copy link

I think it is best to update the go installation section to include the minimal supported go version 1. I experienced the same and was unaware of the reason until I came across this closed issue.

Footnotes

  1. https://github.com/mikefarah/yq#go-install

Kavindu-Dodan referenced this issue in open-feature/flagd-schemas Aug 21, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/setup-node](https://togithub.com/actions/setup-node) | action
| minor | `v3.7.0` -> `v3.8.1` |

---

### Release Notes

<details>
<summary>actions/setup-node (actions/setup-node)</summary>

###
[`v3.8.1`](https://togithub.com/actions/setup-node/releases/tag/v3.8.1)

[Compare
Source](https://togithub.com/actions/setup-node/compare/v3.8.0...v3.8.1)

##### What's Changed

In scope of this release, the filter was removed within the cache-save
step by [@&#8203;dmitry-shibanov](https://togithub.com/dmitry-shibanov)
in
[actions/setup-node#831.
It is filtered and checked in the toolkit/cache library.

**Full Changelog**:
actions/setup-node@v3...v3.8.1

###
[`v3.8.0`](https://togithub.com/actions/setup-node/releases/tag/v3.8.0)

[Compare
Source](https://togithub.com/actions/setup-node/compare/v3.7.0...v3.8.0)

#### What's Changed

##### Bug fixes:

- Add check for existing paths by
[@&#8203;dmitry-shibanov](https://togithub.com/dmitry-shibanov) in
[actions/setup-node#803
- Resolve SymbolicLink by
[@&#8203;dmitry-shibanov](https://togithub.com/dmitry-shibanov) in
[actions/setup-node#809
- Change passing logic for cache input by
[@&#8203;dmitry-shibanov](https://togithub.com/dmitry-shibanov) in
[actions/setup-node#816
- Fix armv7 cache issue by
[@&#8203;louislam](https://togithub.com/louislam) in
[actions/setup-node#794
- Update check-dist workflow name by
[@&#8203;sinchang](https://togithub.com/sinchang) in
[actions/setup-node#710

##### Feature implementations:

- feat: handling the case where "node" is used for tool-versions file.
by [@&#8203;xytis](https://togithub.com/xytis) in
[actions/setup-node#812

##### Documentation changes:

- Refer to semver package name in README.md by
[@&#8203;olleolleolle](https://togithub.com/olleolleolle) in
[actions/setup-node#808

##### Update dependencies:

- Update toolkit cache to fix zstd by
[@&#8203;dmitry-shibanov](https://togithub.com/dmitry-shibanov) in
[actions/setup-node#804
- Bump tough-cookie and
[@&#8203;azure/ms-rest-js](https://togithub.com/azure/ms-rest-js) by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[actions/setup-node#802
- Bump semver from 6.1.2 to 6.3.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[actions/setup-node#807
- Bump word-wrap from 1.2.3 to 1.2.4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[actions/setup-node#815

#### New Contributors

- [@&#8203;olleolleolle](https://togithub.com/olleolleolle) made their
first contribution in
[actions/setup-node#808
- [@&#8203;louislam](https://togithub.com/louislam) made their first
contribution in
[actions/setup-node#794
- [@&#8203;sinchang](https://togithub.com/sinchang) made their first
contribution in
[actions/setup-node#710
- [@&#8203;xytis](https://togithub.com/xytis) made their first
contribution in
[actions/setup-node#812

**Full Changelog**:
actions/setup-node@v3...v3.8.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-feature/schemas).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi40MC4zIiwidXBkYXRlZEluVmVyIjoiMzYuNDMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants