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/vfsgendev: Run generator in package directory #37

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@fawick

fawick commented Nov 28, 2017

This is meant as a proof-of-concept, only. I did not want to spam the discussion in #36 with the diff.

This commit replaces the use of a temporary folder with a temporary file in the package directory itself. Since the generator will write to the package directory anyway, permissions should not be a problem. The import path of the target package is used as part of the filename to reduce the chance of overwriting an existing file.

For some reason running the generator this way does not trigger the error import "foo" is a program, not an importable package.

@dmitshur

This comment has been minimized.

Show comment
Hide comment
@dmitshur

dmitshur Nov 30, 2017

Member

This is meant as a proof-of-concept, only. I did not want to spam the discussion in #36 with the diff.

Acknowledged. Thanks.

I think the code changes will be pretty easy after we come to an agreement about the behavior decision in #36.

Member

dmitshur commented Nov 30, 2017

This is meant as a proof-of-concept, only. I did not want to spam the discussion in #36 with the diff.

Acknowledged. Thanks.

I think the code changes will be pretty easy after we come to an agreement about the behavior decision in #36.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment