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

Consider having pub use its own naming schema for temporary directories #1258

Closed
DartBot opened this issue Jun 5, 2015 · 2 comments
Closed
Labels
type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5475521?v=3" align="left" width="96" height="96"hspace="10"> Issue by ricowind
Originally opened as dart-lang/sdk#22586


Using the system provided mkdtemp will make the directory only readable by the user running the script

Snippet from discussion:
could we simply fix this by not relying on system generated temporary dirs for this? You are already creating these in a directory you control, how about temp/temp_package_name_millisecondsSinceEpoch for the temporary name? Creating that with the normal Directory.create function? It should be a pretty local change if I remember correctly on how pub has the io library

Since there can potentially be more than one pub instance running (in different directories concurrently, getting the same package) - consider also including a hash of the directory you are invoking pub on in the dir name.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


I'm worried that any schema would either allow for potential conflicts or be burdensomely complex. Also, it seems hacky to add a workaround for this in pub when we could just fix issue dart-lang/sdk#15078 and provide value for the entire ecosystem.

@nex3
Copy link
Member

nex3 commented Dec 9, 2015

Thinking about this more, I don't think it's worth coming up with a custom schema for pub.

@nex3 nex3 closed this as completed Dec 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants