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

Makefile: remove legacy trimpath code #4938

Merged
merged 1 commit into from
Apr 12, 2022
Merged

Conversation

bk2204
Copy link
Member

@bk2204 bk2204 commented Apr 11, 2022

Before Go 1.13, it was possible to trim paths with GC flags and ASM flags. In Go 1.13, it became possible to simply specify -trimpath, at which point all the old behaviour became unnecessary.

Since we require Go 1.13 in our code due to the use of the errors package, let's simplify our code by always using the -trimpath flag and omitting the old forms. The old forms additionally were broken when using a path with a space, which could happen on Windows if the current user's username contained a space (which is not uncommon).

@bk2204 bk2204 marked this pull request as ready for review April 11, 2022 20:24
@bk2204 bk2204 requested a review from a team as a code owner April 11, 2022 20:24
Copy link
Member

@chrisd8088 chrisd8088 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wondered about some additional simplifications, but otherwise this looks all good!

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Before Go 1.13, it was possible to trim paths with GC flags and ASM
flags.  In Go 1.13, it became possible to simply specify -trimpath, at
which point all the old behaviour became unnecessary.

Since we require Go 1.13 in our code due to the use of the errors
package, let's simplify our code by always using the -trimpath flag and
omitting the old forms.  The old forms additionally were broken when
using a path with a space, which could happen on Windows if the current
user's username contained a space (which is not uncommon).
@bk2204
Copy link
Member Author

bk2204 commented Apr 12, 2022

I've made all of those changes and will merge when this looks green.

@bk2204 bk2204 merged commit b8d50dc into git-lfs:main Apr 12, 2022
@bk2204 bk2204 deleted the tidy-trimpath branch April 12, 2022 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants