-
Notifications
You must be signed in to change notification settings - Fork 19
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 #34 -- Don't remove files with a hidden component #50
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it would be better to restrict this PR to the relevant change in loader.cr
.
Lint and formatter updates could go into a separate one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: What's happening with this file?
Done, removed that from here. |
Is there any way to get this merged? This is a popular shard and this is a real bug |
ping @schovi |
It’s seem like just not get hidden file/folder baked into binary, this behavior is expected, those codes were added intentionally, to avoid the user added hidden user data to the binary accidentally, i consider it is not a bug. |
@zw963 This is a very limiting design joice. The user should decide which files they want to bake, and there's no good reason to categorially exclude path components that start with a dot. Especially considering that the hidden file semantics are just a convention on POSIX systems. On Windows for example path components starting with a dot are not considered hidden. |
And by not making this optional it means what you get in the baked binary
depends on what folder you build it on.
In Arch Linux, for example, source-based packages are built inside .cache
which means you get nothing in the binary
…On Thu, Sep 19, 2024, 4:59 AM Johannes Müller ***@***.***> wrote:
@zw963 <https://github.com/zw963> This is a very limiting design joice.
The user should decide which files they want to bake, and there's no good
reason to categorially exclude path components that start with a dot.
Especially considering that the hidden file semantics are just a convention
on POSIX systems. On Windows for example path components starting with a
dot are not considered hidden.
—
Reply to this email directly, view it on GitHub
<#50 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAMK5NTMKC2YKIQO2ZJC3ZXJ75LAVCNFSM6AAAAABNCZ6BN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRQGI3DCNBVGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Looks like the bug description is not clear enough. It's not just that you can't add Further, if you want to add This means the result of baking a directory into the binary depend not only on the relative path of the file you want to put in the binary but ON THE PATH WHERE THE CODE IS LOCATED. I am not adding .cache into the binary. The tools to build binaries from source build them inside .cache For example, pikaur would use |
This may not be a perfect fix but at least it makes the behaviour more predictable.
Without this, what files get baked into the binary depends on the path where you are building the software.
Specifically, when packaging for Arch Linux, packages are built inside ~/.cache which meant no files were ever accepted.