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

Add experimental Plan 9 support #15

Merged
merged 8 commits into from
Mar 10, 2021
Merged

Add experimental Plan 9 support #15

merged 8 commits into from
Mar 10, 2021

Conversation

adrg
Copy link
Owner

@adrg adrg commented Mar 3, 2021

No description provided.

@codecov
Copy link

codecov bot commented Mar 3, 2021

Codecov Report

Merging #15 (64bf6ff) into master (1f7450a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #15   +/-   ##
=======================================
  Coverage   92.63%   92.63%           
=======================================
  Files           6        6           
  Lines         190      190           
=======================================
  Hits          176      176           
  Misses         13       13           
  Partials        1        1           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f7450a...64bf6ff. Read the comment docs.

@adrg adrg mentioned this pull request Mar 3, 2021
@nvkv
Copy link

nvkv commented Mar 5, 2021

Hey hey!

I'm the guy with Plan 9 who did run tests, here are results: http://okturing.com/src/10576/body

I'm a bit constrained in time, so I can't dig deeper into the issue, but will try to take a look on weekend.
Thanks a lot for doing this.

@adrg
Copy link
Owner Author

adrg commented Mar 5, 2021

Hey hey!

I'm the guy with Plan 9 who did run tests, here are results: http://okturing.com/src/10576/body

I'm a bit constrained in time, so I can't dig deeper into the issue, but will try to take a look on weekend.
Thanks a lot for doing this.

Hi @nvkv. Thank you for testing the PR. The output you posted was very helpful.
Can you pull the latest changes and run the tests again when you get the time?

Also, what do you think about the default paths? I ran a Plan 9 virtual machine and looked around the fs so I could decide on some suitable default paths for the XDG variables (XDG is not supported on Plan 9 so the defaults will always be used probably).
For example, would you keep documents in $home/documents or would you prefer $home/lib/documents?

@nvkv
Copy link

nvkv commented Mar 9, 2021

Good morning again. Sorry for disappearing for couple of days.
So yeah, tests are green right now.

Also, what do you think about the default paths?

This is truly hard to say because XDG is not a thing in Plan 9 like at all. There is no convention where to store your documents. For example mine are in /n/other. It's totally unpredictable beforehand where people will store their stuff on Plan 9.

I'd rather kept it simple. Everything that is supposed to be config should be in $home/lib, everything that supposed to be application data probably too. And everything that is user handled documents just in $home.

@adrg
Copy link
Owner Author

adrg commented Mar 9, 2021

Hi @nvkv

Good morning again. Sorry for disappearing for couple of days.
So yeah, tests are green right now.

Great to hear. Thanks again for testing the PR.

Also, what do you think about the default paths?

This is truly hard to say because XDG is not a thing in Plan 9 like at all. There is no convention where to store your documents. For example mine are in /n/other. It's totally unpredictable beforehand where people will store their stuff on Plan 9.

I'd rather kept it simple. Everything that is supposed to be config should be in $home/lib, everything that supposed to be application data probably too. And everything that is user handled documents just in $home.

Yes, I agree. I'm not a Plan 9 user, so I wanted to get some feedback on the best practices of storing different types of files.
Here's a rundown of the default paths introduced in this PR:

Base directories

  • XDG_DATA_HOME (Default location for data files): $home/lib
  • XDG_DATA_DIRS (Additional paths to search for data files): [/lib]
  • XDG_CONFIG_HOME (Default location for config files): $home/lib
  • XDG_CONFIG_DIRS (Additional paths to search for config files): [/lib]
  • XDG_CACHE_HOME (Default location for cache files): $home/lib/cache
  • XDG_RUNTIME_DIR (Default location for runtime files): /tmp
  • XDG_STATE_HOME (Non-standard even in Linux, default location for highly volatile data files): $home/lib/state

User directories

  • XDG_DOCUMENTS_DIR: $home/documents
  • XDG_MUSIC_DIR: $home/music
  • XDG_PICTURES_DIR: $home/pictures
  • XDG_VIDEOS_DIR: $home/videos
  • XDG_DOWNLOAD_DIR: $home/downloads
  • XDG_TEMPLATES_DIR: $home/templates
  • XDG_PUBLICSHARE_DIR: $home/public
  • XDG_DESKTOP_DIR (Not sure about this one. Is there a desktop path in Plan 9?): $home/desktop

Other non-standard paths

  • Application directories (Search paths for binaries): [$home/bin, /bin]
  • Font directories (Search paths for fonts): [$home/lib/font, /lib/font]

Please let me know if you think there's a more suitable location for any of the paths I listed above.

@nvkv
Copy link

nvkv commented Mar 10, 2021

I think it's safe to merge as it is right now. Since there is little to no software relying on XDG which runs on Plan 9 you can do anything right now. If some day it will become a problem it can be fixed quite easily.

And yeah, ther is no desktop on Plan 9, my proposal is to just use $home/ as "desktop".

@adrg adrg merged commit ecf63cb into master Mar 10, 2021
@adrg
Copy link
Owner Author

adrg commented Mar 10, 2021

I think it's safe to merge as it is right now. Since there is little to no software relying on XDG which runs on Plan 9 you can do anything right now. If some day it will become a problem it can be fixed quite easily.

And yeah, ther is no desktop on Plan 9, my proposal is to just use $home/ as "desktop".

Yeah, some/most of them can be changed later, if necessary. Thank you again for your help.

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