calva

Wednesdays you might find @U0ETXRFEW in the Gather Calva space. Invite is https://gather.town/invite?token=GZqrm7CR and the password is `Be kind`.
borkdude 2020-09-09T09:44:33.208600Z

Any Windows users here? If you specify config for a command line tool (like clj-kondo), where would you expect this on Windows? Clj-kondo expects it to be in C:\Users\foobar\.config\clj-kondo, in the next version. But someone commented here that Windows has a specific API for this: https://github.com/borkdude/clj-kondo/issues/992#issuecomment-689446189 Personally I'd rather look in .config\clj-kondo then some weird AppData folder nested somewhere deeply with GUID-named dirs.

chucklehead 2020-09-09T11:46:48.209Z

I would say 'idiomatic' Windows CLI would be either %USERPROFILE%\.config\clj-kondo (matches git, scoop)`%USERPROFILE%\.clj-kondo\config` (matches AWS CLI, dotnet core cli tools) or possibly something like %LOCALAPPDATA%\clj-kondo

chucklehead 2020-09-09T11:48:26.209200Z

or in the case of that doc FOLDERID_LocalAppData or FOLDERID_Profile would be the base directory I'd start looking in if I wanted to find an applications config folder

borkdude 2020-09-09T11:58:43.209400Z

What is FOLDERID

borkdude 2020-09-09T11:59:26.209600Z

I have a preference for %USERPROFILE%\.config\clj-kondo since that also matches linux and macOS

littleli 2020-09-09T12:08:04.209900Z

I would probably build a list of candidate paths and walk through them in search for the config. Some people may prefer %APPDATA%/clj-kondo/config

borkdude 2020-09-09T12:08:59.210100Z

$env:APPDATA
C:\Users\borkdude\AppData\Roaming
You can control that with XDG_CONFIG_HOME set to APPDATA if you want that.

borkdude 2020-09-09T12:09:58.210300Z

Exactly the same as scoop does: https://github.com/lukesampson/scoop/blob/master/lib/core.ps1#L967-L968

littleli 2020-09-09T12:15:14.210700Z

yeah, it's somehow what I suggested 🙂

littleli 2020-09-09T12:15:56.210900Z

Some machines have different local and roaming profile, but I cannot tell what are the consequences of that.

borkdude 2020-09-09T12:16:26.211300Z

well, not really. clj-kondo will not scan a list, it will check the default location unless you have overriden it with XDG_CONFIG_HOME. If people use roaming profiles, they should probably use that

borkdude 2020-09-09T12:16:47.211500Z

and then hope that Visual Studio Code etc also picks up on that. I think so right

chucklehead 2020-09-09T12:19:20.211800Z

if you're locating the base folder via APPDATA environment variable roaming/local profile should 'just work' , LOCALAPPDATA would not sync between machines if user had a roaming profile

👍 1
borkdude 2020-09-09T12:22:33.212100Z

Seems to work:

borkdude 2020-09-09T12:22:43.212300Z

borkdude 2020-09-09T12:22:53.212800Z

borkdude 2020-09-09T12:32:28.213300Z

So I think this gives enough flexibility?

littleli 2020-09-09T12:35:23.213500Z

So if I understand correctly people who want to use clj-kondo would be advised to set environment variable XDG_CONFIG_HOME properly based on their system?

littleli 2020-09-09T12:35:53.213700Z

and clj-kondo will use just that on all the platforms equally?

borkdude 2020-09-09T12:36:47.213900Z

clj-kondo will look in $XDG_CONFIG_HOME/clj-kondo if the env var is set, else in $HOME/.config/clj-kondo . Same on all OSes.

littleli 2020-09-09T12:37:13.214100Z

Sounds quite ok to me.

borkdude 2020-09-09T12:40:02.214300Z

where $HOME = %userprofile% on Windows of course

👍 1
borkdude 2020-09-09T12:40:18.214500Z

it's actually using the Java property user.home

borkdude 2020-09-09T19:01:40.215Z

@kardan This guide just came out today: https://docs.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers

👀 1
borkdude 2020-09-09T19:01:50.215400Z

related to our conversation yesterday