sidekick icon indicating copy to clipboard operation
sidekick copied to clipboard

Flutter SDK not Installed using custom cache directory.

Open marcos930807 opened this issue 3 years ago • 20 comments

Hi @leoafarias thanks for your amazing work here!! I have configured the fvm cache in a custom directory using the environment variable FVM_HOME however sidekick tells me that I do not have any version installed. Is there anything else I have to configure? {▸} ~echo $FVM_HOME /Users/marcos/Documents/SDKs/fvm

marcos930807 avatar Mar 25 '21 18:03 marcos930807

@marcos930807 I believe this might be a bug. For now, can you try using the config? fvm config --cache-path <CACHE_PATH>

leoafarias avatar Mar 25 '21 19:03 leoafarias

@marcos930807 I believe this might be a bug. For now, can you try using the config? fvm config --cache-path <CACHE_PATH>

Dos not work either. I am on macOS 11.0.1 20B29 darwin-x64 ,BigSur

marcos930807 avatar Mar 25 '21 19:03 marcos930807

@marcos930807 just tested and --cache-path works, but you have to make sure you close the app and open it again after the change

leoafarias avatar Mar 25 '21 20:03 leoafarias

@marcos930807 I will go ahead and close this issue, please reopen if the solution above did not work

leoafarias avatar Apr 13 '21 10:04 leoafarias

@marcos930807 I will go ahead and close this issue, please reopen if the solution above did not work

From 200 stars in fvm to 2000, cache-path has never been effective. It is also BigSur, which is why I have never used it.

Pluto1219 avatar Sep 08 '21 09:09 Pluto1219

@marcos930807 I will go ahead and close this issue, please reopen if the solution above did not work

From 200 stars in fvm to 2000, cache-path has never been effective. It is also BigSur, which is why I have never used it.

Added note, cache-path does not take effect in sidekick.

Pluto1219 avatar Sep 08 '21 09:09 Pluto1219

@Pluto1219 let me know the situation which cache path is not working . Also we are still stabilizing sidekick but it has been tested to work after an app restart.

Please give me a bit more info so I can dig in.

leoafarias avatar Sep 08 '21 11:09 leoafarias

@Pluto1219 let me know the situation which cache path is not working . Also we are still stabilizing sidekick but it has been tested to work after an app restart.

Please give me a bit more info so I can dig in.

I don't know what went wrong, if it can be fixed, it would be great.

image

image

Pluto1219 avatar Sep 09 '21 01:09 Pluto1219

Same problem here, neither FVM_HOME nor setting cache_path works ...

BigSur 11.5.2

matecode avatar Sep 09 '21 12:09 matecode

@marcos930807 just tested and --cache-path works, but you have to make sure you close the app and open it again after the change

I haven't tested it yet,I think it's a mac gui environment variable issue.

According to the search result, GUI and terminal are two sets of environment variables.

Your test worked because you didn't set FVM_HOME, so the default .setting was found, so cache-path is valid.

If set FVM_HOME, you will still find the default .setting.

If that's the case, I think you can deprecate FVM_HOME and just use fixed configuration directories like fvm, .fvm, and .config/fvm

kassadin avatar Sep 10 '21 06:09 kassadin

I haven't tested it yet,I think it's a mac gui environment variable issue.

I can confirm that. I have FVM_HOME set in my .zshenv and if i open Sidekick from Terminal with open -a Sidekick everything works fine

matecode avatar Sep 10 '21 13:09 matecode

@Pluto1219 let me know the situation which cache path is not working . Also we are still stabilizing sidekick but it has been tested to work after an app restart.

Please give me a bit more info so I can dig in.

I can debug it for you if you want.

Pluto1219 avatar Sep 16 '21 11:09 Pluto1219

@Pluto1219 just based on the conversation.

  • Does sidekick respect the cache-path config without FVM_HOME
  • Does sidekick respect FVM_HOME without cache-path
  • Does the issue only happen when configuring both together?

If you can tell me a bit more about the behavior when it happens and when it does not would allow me to make the necessary changes.

Thanks

leoafarias avatar Sep 16 '21 12:09 leoafarias

First of all, MY FVM was installed a long time ago via Pub Global Activate FVM. Today I tried brew installation and configured -- cache-Path again, and the Sidekick download path worked. So I recommend only using the Brew Install FVM method and only configuring --cache-path to minimize unknown problems. Thanks again to my buddy for developing such a great tool.

Pluto1219 avatar Sep 17 '21 01:09 Pluto1219

@Pluto1219 no problem! We do it at the pleasure of the community!

I will leave this open for now so we can hopefully review it before 1.0. In the mean time if anyone can provide more insight it would be helpful!

leoafarias avatar Sep 17 '21 16:09 leoafarias

Sometimes Sidekick app on my mac failed to find Flutter installations. After re-run fvm config --cache-path /path/to/fvm/versions it can run without trouble again 😎

alann-maulana avatar Sep 25 '21 02:09 alann-maulana

Do I need install flutter sdk again to use side kick,

I already have SDK which I can find by checking terminal which flutter

Santosh-AD avatar May 13 '22 12:05 Santosh-AD

@Santosh-AD I don't think this is related to this thread. FVM handles only versions installed through FVM so an existing flutter version won't be detected..

leoafarias avatar May 13 '22 12:05 leoafarias

Ideally yes @Santosh-AD, you can then set "flutter" to any version you want thorugh FVM/Sidekick

aguilaair avatar May 13 '22 12:05 aguilaair

I didn't have time to check the code base to get the issue, but a workaround to this issue is there will be .fvm and fvm folder in $HOME directory. In the .settings file contained in fvm folder update cachePath to the versions folder <"cachePath": "path/to/your/custom/fvm/home/dir/versions",>. Restart the Sidekick app and issue will be resolved.

Needs to be verified if on per project basis the fvm version change take place efforlessly...

Basically You will have two .settings file to manage. If you need to have some consistency with .npm .nvm and .fvm.

GelidGeorge avatar Sep 04 '23 09:09 GelidGeorge