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

gx packages should be read-only #202

Open
frrist opened this issue Aug 16, 2018 · 6 comments
Open

gx packages should be read-only #202

frrist opened this issue Aug 16, 2018 · 6 comments

Comments

@frrist
Copy link
Contributor

frrist commented Aug 16, 2018

Packages under $GOPATH/src/gx/... should be read-only. This will prevent accidental edits to the contents of said packages.

@Stebalien
Copy link
Collaborator

But I like editing my deps... Oh well, I guess I can just power through and force-write.

@frrist
Copy link
Contributor Author

frrist commented Aug 17, 2018

I am wanting to avoid a scenario where the import path hash doesn't actually represent the package contents, can be tricky to debug... 😟

@schomatis
Copy link
Collaborator

I agree that without git in those packages an inadvertent modification can be really hard to spot, but I also like modifying packages (especially when debugging a tricky situation), I would like to have something similar to git status or git diff (#161), but I'm not sure if that's even possible as the packages are already modified when installed, so I guess no package matches its hash from the start and additional modifications will just go undetected.

@frrist
Copy link
Contributor Author

frrist commented Aug 17, 2018

This wouldn't actually prevent the packages from being modified, it would just require an extra command (chmod) in order to do so -- serves as a barrier to prevent it from happening accidentally.

@schomatis
Copy link
Collaborator

Yes, I didn't mean that this would be a final protection but that it may be cumbersome to chmod to and from while debugging. But you're right, it makes sense to protect them by default, modifying them is the exception rather than the rule.

@Stebalien
Copy link
Collaborator

Yes, I didn't mean that this would be a final protection but that it may be cumbersome to chmod to and from while debugging. But you're right, it makes sense to protect them by default, modifying them is the exception rather than the rule.

Most editors allow one to "force write".

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

No branches or pull requests

3 participants