-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
cmd/go: revisit allowed set of characters in module, import, and file paths #45549
Comments
Please support Chinese characters |
For culture diversity, maybe we should take more uncode tyep into consideration. |
The file in question is not a Go file, but a file for testing. The filename has quotes in it, causing error during install: $ go install github.com/MawKKe/audiobook-split-ffmpeg-go/cmd/audiobook-split-ffmpeg@latest go: github.com/MawKKe/audiobook-split-ffmpeg-go/cmd/audiobook-split-ffmpeg@latest: create zip: test/beep with spaces and some' quotes" in name.m4a: malformed file path "test/beep with spaces and some' quotes\" in name.m4a": invalid char '\'' Perhaps these are related? - golang/go#50396 - golang/go#45549 Idk, life is too short for dealing with shitty tooling...
Related: the handling of punycode domains. #20210 |
Also related, the conclusion that it's up to review tooling to keep homoglyph or LTR/RTL attacks at bay. https://research.swtch.com/trojan |
Please support Chinese characters |
Also related, #44970 discusses spec interactions. |
go1.15.15 (This version is normal, and errors are reported in subsequent versions) |
Proposal: skip checking resource file names |
when I use go 1.15 without go.mod, my go package can name as "ACM题目小马过河"。 while after I use go.mod in go1.20 or go1.21,it says. not support. I think the "ACM题目小马过河" is easy to be understood for me. easy more than "ACM topic Pony Crossing the River". So I think it's important to support native languages。 If you think it can make some mistakes. you can use a flag such as "support_native_language", when I open it, my package can not be popular but only for fun. |
我目前直接用1.15版本,有解决办法再交流。
一直永远
***@***.***
…------------------ 原始邮件 ------------------
发件人: "golang/go" ***@***.***>;
发送时间: 2023年9月8日(星期五) 晚上9:05
***@***.***>;
***@***.******@***.***>;
主题: Re: [golang/go] cmd/go: revisit allowed set of characters in module, import, and file paths (#45549)
when I use go 1.15 without go.mod, my go package can name as "ACM题目小马过河"。
while after I use go.mod in go1.20 or go1.21,it says. not support.
I think the "ACM题目小马过河" is easy to be understood for me. easy more than "ACM topic Pony Crossing the River".
So I think it's important to support native languages。
If you think it can make some mistakes. you can use a flag such as "support_native_language", when I open it, my package can not be popular but only for fun.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Since #66243 was closed as a dupe of this issue, it's worth pointing out here that this issue seems to break the Go Sum DB. As an example, https://sum.golang.org/lookup/github.com/!doppler!h!q/cli@v0.5.9 currently has the following output:
This seems to be because there are files in the repo which have colons in. (It seems like maybe a separate bug that the Go sum DB prints errors like that as output) |
Closing this issue since #67562 has been opened as a proposal to do something similar. |
Currently, import paths have the following lexical restrictions (see
module.CheckImportPath
):- . _ ~
. Must not end with a dot or contain two dots in a row.Module paths have the same restrictions as import paths, with additional constraints (see
module.CheckPath
:/vN
where N consists of ASCII digits and dots, N must not begin with 0, must not be 1, and must not contain any dots (there's a separate special case forgopkg.in/...
module paths).File paths have the same restrictions as import paths, but the set of allowed characters is larger (see
module.CheckFilePath
):! # $ % & ( ) + , - . = @ [ ] ^ _ { } ~
. The remaining ASCII punctuation characters" * < > ? ` ' | / \ :
are excluded.These restrictions are generally in place for good reasons (see Unicode restrictions):
-
), or might be interpreted as a repository (.git
).That being said, these restrictions more English-centric than necessary (#45507). They're also more restrictive than GOPATH (#29101).
We should come up with a wider set of characters that may be allowed without causing compatibility problems, particularly for import and file paths.
cc @bcmills @matloob
The text was updated successfully, but these errors were encountered: