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

google/shlex is archived #4963

Closed
Tracked by #114942
pacoxu opened this issue Jan 9, 2023 · 7 comments
Closed
Tracked by #114942

google/shlex is archived #4963

pacoxu opened this issue Jan 9, 2023 · 7 comments
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@pacoxu
Copy link
Member

pacoxu commented Jan 9, 2023

github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510

follow up of kubernetes/kubernetes#114912

github.com/google/shlex is archived.

@k8s-ci-robot k8s-ci-robot added needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 9, 2023
@pacoxu pacoxu changed the title github.com/google/shlex is archived google/shlex is archived Jan 9, 2023
@pacoxu
Copy link
Member Author

pacoxu commented Jan 10, 2023

I cannot find a valid replacement for this.

@KnVerey
Copy link
Contributor

KnVerey commented Jan 14, 2023

Hmm, I guess we'll have to look more deeply at what we use this for. There is only one usage:

p.args, _ = shlex.Split(c.ArgsOneLiner)

/triage accepted
/kind cleanup

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Jan 14, 2023
@pacoxu
Copy link
Member Author

pacoxu commented Jan 29, 2023

Not sure if https://pkg.go.dev/mvdan.cc/sh/v3@v3.6.0/shell can help in this case.

@k8s-triage-robot
Copy link

This issue has not been updated in over 1 year, and should be re-triaged.

You can:

  • Confirm that this issue is still relevant with /triage accepted (org members only)
  • Close this issue with /close

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. and removed triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Jan 29, 2024
@pacoxu
Copy link
Member Author

pacoxu commented Jan 29, 2024

#5006 (comment) may be a workaround to maintain it in util.

@pacoxu
Copy link
Member Author

pacoxu commented Jan 29, 2024

kubernetes/utils#300 may be a fix, but as we have no new requirements on it. I prefer to do nothing now.

@pacoxu pacoxu closed this as completed Jan 29, 2024
@pohly
Copy link
Contributor

pohly commented Apr 12, 2024

Hmm, I guess we'll have to look more deeply at what we use this for. There is only one usage:

p.args, _ = shlex.Split(c.ArgsOneLiner)

Note that google/shlex does not handle POSIX correctly:
https://go.dev/play/p/jiQpbBDQGUD

package main

import (
	"fmt"

	"github.com/google/shlex"
)

func main() {
	args, _ := shlex.Split(`"\[Flaky\]"`)
	fmt.Printf("%q", args)

	// Prints ["[Flaky]"], should be ["\\[Flaky\\]"] because
	// a shell (bash in my case) leaves the backslash in place:
	// $ echo "\[Flaky\]"
	// \[Flaky\]
}

github.com/anmitsu/go-shlex handles this when using POSIX mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants