Closed carlynorama closed 3 months ago
rm'd the appropriate directories (found by find ~ -iname *swiftly*
or you know the directions ) and reinstalled.
Issue dissapears. Weirdly I did have to install main-snapshot twice, but that maybe because I didn't deinstall the toolchains first? I just rm'd the dir? Or something else I was playing with in another window??)
(It's possible that the installer could be improved at detecting a previous install/ownsership of toolchains issues better, or the delete could warn better, but it's such early days and the current install base so small and the new updater already written I'm not sure how often this will actually come up)
@carlynorama When you say you ran swiftly in 2 windows did you do that at the same time?
Because if that is the order you ran the different commands it doesn't seem to make sense.
ie the main snapshot was the in use version of swift but when you ran update
it updated the 5.10 install
Yes, at the same time. Let's see if i can clear it up bit.
curl -L https://swiftlang.github.io/swiftly/swiftly-install.sh | bash
, then option 1 to "update" my 0.2.0 install to 0.3.0, did nothing to deinstall swiftly or the toolchain before hand. I did the full "it's Friday night. YOLO. Let's just see."swiftly install main-snapshot
and switched to it using use
, no problems.list
, it does not list 5.10.1 (latest) because I hadn't installed that yet, but it does list main-snapshot-2024-07-15 (in use) and all the previous toolchains I had with v0.2.0.swiftly install latest
swiftly uninstall 5.10.0
because I wasn't going to need it. list
again to check that 5.10.0 had been deinstalled. Instead I saw:Super weird. I submitted the issue and stopped for the night.
This morning I noticed there was still some pointing-to-outside-swiftly messages when trying to switch toolchains with use
. I figured that this really must be my sloppy install hygine, and decided to clear everything swiftly out and start fresh. I did not do an ls -al
on these directories to check their permissions. That would have been good data to have in hindsight.
It seems to all be working now. I installed
latest
, main-snapshot
(which I needed to do twice? I'm not really sure what that was about. I chalked it up to ghost of bad-permissions past and just tried to blow through it with a second call to install
, which worked. I was relying on the reporting done by list
. I did not check the folder myself, which also would have been useful to have done in retrospect) 5.9
, I followed those installs up with a swiftly uninstall 5.9
with the main-snapshot again the chosen toolchain. It behaved as expected (5.9 gone, m-s still in use). What I did NOT check was having a 5.10.x or 5.9.x installed and deleting it while installing a 5.10.n or 5.9.n.
This is a wee little Ubuntu machine I can wipe with very low stress. Would it be helpful for me to delete swiftly again, uninstalling the toolchains correctly this time, reinstall 0.2.0, and try to recreate? I'm comfortable calling this user error, but if there's data wanted, I can try to collect it.
Note, using use
stopped working, nor could I fully uninstall all. Was getting a "The file doesn't exist." for both failures when interacting with main-snapshot-2024-07-15
Did
rm -r ~/.local/bin/swiftly
rm -r ~/.local/share/swiftly/
AND
find ~/.local/bin/ -maxdepth 1 -type l
find ~/.local/bin/ -maxdepth 1 -type l -delete
THEN reinstalled 0.3.0
NOW everything really works as expected.
I think the fact you were running swiftly in two windows at the same time is probably the issue. We haven't tested for this at all.
I agree with that assessment. Surviving multi-window-operation is a big big lift. I wouldn't honestly actually really expect it from a 0.3.0, as I said I was dinking around too fast on a Friday on an inconsequential dev box. Did want to note manual deleting the symlinks for the next time I get myself into a jam.
Thanks for even taking a look!
Hi, I was running 0.2.0, but just today updated to 0.3.0 by running the install script without deleting the previous version of swiftly because 0.2.0 didn't have update working yet.
I went to delete a toolchain I wasn't going to use anymore, and instead it deleted the active toolchain and switched to the one I was deleting.
It was fine, I recovered easily in this case, but should nuke swiftly and all it's folders from orbit to make the move from 0.2.0 -> 0.3.0 or a problem with the actual
uninstall
command?In window one:
In window 2, just for full disclosure
Back in window 1
I think the mistake (if its in the code and not the lack of fresh install) has to be in: https://github.com/swiftlang/swiftly/blob/bcfd8439a078893c11d3331c193e2b6a7b431887/Sources/Swiftly/Uninstall.swift
Because I don't see how this could have gone wrong? (I'm on Linux) https://github.com/swiftlang/swiftly/blob/bcfd8439a078893c11d3331c193e2b6a7b431887/Sources/LinuxPlatform/Linux.swift#L108