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

Fix project dirs path #774

Merged
merged 3 commits into from
Jun 20, 2019
Merged

Fix project dirs path #774

merged 3 commits into from
Jun 20, 2019

Conversation

soc
Copy link
Contributor

@soc soc commented Jun 14, 2019

ProjectDirs::from("miri", "miri", "miri")

would get you miri\miri on Windows and miri.miri.miri on macOS.

I'm assuming here that your intention was to have only a miri directory on every OS.

@RalfJung
Copy link
Member

So on Linux, this remains at ~/.cache/miri?

To fix Windows CI, you'll have to adjust the path here.

    ProjectDirs::from("miri", "miri", "miri")

would get you `miri\miri` on Windows and `miri.miri.miri` on macOS.

I'm assuming here that your intention was to have only a `miri` directory on every OS.
@soc
Copy link
Contributor Author

soc commented Jun 15, 2019

@RalfJung Yes. The arguments for ProjectDirs::from are qualifier: &str, organization: &str, application: &str, not e. g. linux: &str, macos: &str, windows: &str: https://docs.rs/directories/2.0.1/directories/struct.ProjectDirs.html#method.from

@RalfJung
Copy link
Member

I see. Would it make sense for us to use "rust" or "rust-lang" as "organization"?
I don't know what "qualifier" is supposed to mean.

@soc
Copy link
Contributor Author

soc commented Jun 15, 2019

Qualifier is for macOS so that ProjectDirs::from("com", "Foo Corp", "Bar App") gets you

Lin: /home/alice/.config/barapp
Win: C:\Users\Alice\AppData\Roaming\Foo Corp\Bar App\config
Mac: /Users/Alice/Library/Preferences/com.Foo-Corp.Bar-App

rust or rust-lang could be an option, too, depends on how you want it to look like on macOS.

If you want to go the full way, you could pick ProjectDirs::from("org", "rust-lang", "miri"), would probably make sense to coordinate with other rust-related projects though, such that it is at least consistent.

@RalfJung
Copy link
Member

TBH I care very little about how our paths look like on macOS.^^ I was just wondering what makes most sense.

@RalfJung
Copy link
Member

Nobody seemed to care much when I asked on Zulip. So I'd say let's go with org.rust-lang.miri on macOS, unless @oli-obk objects.

@oli-obk
Copy link
Contributor

oli-obk commented Jun 17, 2019

unless @oli-obk objects.

quite the opposite, let's do this

@RalfJung
Copy link
Member

@soc okay so can you make this "org", "rust-lang", "miri"? That will have the effect of using org.rust-lang.miri on macOS and rust-lang\miri on Windows, right?

@soc
Copy link
Contributor Author

soc commented Jun 20, 2019

@RalfJung Sorry for the delay, your commit looks good to me. Thanks!

@RalfJung
Copy link
Member

No trouble, and thanks for pointing out that we were using this API the wrong way. :)

@soc
Copy link
Contributor Author

soc commented Jun 20, 2019

It's been a pleasure! Now I just need to fix cargo and the rest of the ecosystem. :-)

@RalfJung RalfJung merged commit 53b46db into rust-lang:master Jun 20, 2019
@soc soc deleted the patch-1 branch June 21, 2019 00:07
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.

3 participants