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
buildmode plugin issue of package not found #19
Comments
@mvdan Another strange issue was:
it will run garble as well, just like I run garble directly, but it's way faster... Yes it didn't have:
But in another clean machine without garble installed, it looks fine without any issue. |
I cannot reproduce this at all:
|
Confirm again in LInux. Before was in MacOS. p.s. garble version is retrieved from https://github.com/mvdan/garble and build with "go build .".
|
Maybe try giving me a script I can run inside a golang Docker image. Otherwise I'll have to spend hours trying to guess what's causing the failure for you. |
@mvdan OK, I'll try. |
Please unzip the attached file and then run:
|
@mvdan how about the progress? |
This is an open source side project that I do for free on my spare time. If you want me to work faster, consider becoming a sponsor. |
Can you reproduce the issue now? I just wonder whether my info is enough. |
I haven't tried yet. |
Got it, if need any further informations, please let me know. |
OK, I was able to repro like so:
This seems to be an error on your part; when you build a package, you should specify a package path, not a file. The first command works, but yours does not:
|
It's not clear why |
OK, I can finally reproduce this without Docker. I still think you should be building the entire package instead of a single file, but there's still a weird bug at play here that we should fix. |
Also, the reason I wasn't reproducing this on my laptop is because I had already set GOPRIVATE for a different project, and wasn't actually obfuscating anything. My bad. I've filed #20 for that. |
Hmm, yes, it's fine to build without specified main.go. But if there are more than one main.go in this package sub-directory the build should be wrong or mixed, so in common we should name the main entry here. Also the pure go will support this kind of build without any problem. Anyway, it works in your way, thank you. |
Looks garble won't obfuscate imported 3rd party packages, or just some misconfiguration? |
In my test, garble don't obfuscate the sub dir name of package, in above case, "dll" would remain the original name, but the func name and struct name have been obfuscated. Should the sub dir name be obfuscated as well? |
Thanks, this question explained.
But I don't understand why the sub-dir of GOPRIVATE package remain same? |
That's https://github.com/mvdan/garble/issues/13. Package paths are not obfuscated yet. |
So it's a pending implementation, right? |
Yes, that's why the issue is still open. |
The files as follows:
Then run command:
Get the errors:
It really weird... Seems can not find the package.
The text was updated successfully, but these errors were encountered: