Commit Graph

23 Commits

Author SHA1 Message Date
Dave Yarwood
58029681f0 Gracefully handle the directory to be cleaned up not existing yet 2021-08-01 17:38:20 -04:00
Dave Yarwood
ad365a59ec Rename system/player_management.go => system/process_management.go 2021-08-01 17:28:28 -04:00
Dave Yarwood
1befa5f0b9 Clean up stale REPL server state files, too 2021-08-01 17:20:45 -04:00
Dave Yarwood
0cbd70334c alda doctor: test for the presence/absence of REPL server state file 2021-08-01 17:08:42 -04:00
Dave Yarwood
e67adb84c9 Alda REPL servers write state files 2021-08-01 17:05:46 -04:00
Dave Yarwood
823b711522 2.0.2: Fix "stale state" bug where Alda would occasionally attempt to use old player processes that are no longer running 2021-07-31 17:52:57 -04:00
Dave Yarwood
ecb5aae370 Hack to work around aurora not supporting NO_COLOR 2021-06-28 11:04:48 -04:00
Dave Yarwood
723bcb85cc Recognize renamed .exe files 2021-05-01 15:28:13 -04:00
Dave Yarwood
2d191ff6d9 Improvements to handling situations where alda-player isn't installed or is the wrong version
In either of these scenarios, `alda doctor` will now offer to install the
correct alda-player version.

I've updated the relevant user-facing error messages to recommend running `alda
doctor` to remedy the situation.

This incidentally also improves the way that we've been spawning player
processes. I realized that for _each_ of the player processes that we spawn (and
it can be up to 3 at once, I think?), we first invoke `alda-player info` to
check the `alda-player` version against the `alda` version, but we really only
need to do this once.
2021-03-25 21:59:28 -04:00
Dave Yarwood
1839e93bb7 Implement a (hopefully!) robust alda update mechanism
I haven't yet implemented the part where use the Alda API to check for versions
newer than the one installed. This commit is just the actual update mechanism.
`alda update` takes a flag that lets you specify which version you want to
install. That works, as of this commit, and hopefully I've done it in a way that
will work on Windows, macOS, and Linux. CI will tell me whether or not this is
the case when I push this commit.
2021-03-06 15:36:11 -05:00
Dave Yarwood
fb93692e95 Fix/update some code that checks whether a file exists
There are a couple of issues here:

1. I was incorrectly checking `os.IsExist(err)`, a condition that should _never_
   happen as a result of `os.Stat`, because if the file exists, then `err` is
   nil.

2. It turns out that in newer versions of Go, the recommendation is to use
   `errors.Is(err, os.ErrNotExist)`.
2021-02-27 20:13:50 -05:00
Dave Yarwood
ae631d785f inform users of telemetry on first run 2021-01-30 21:01:17 -05:00
Dave Yarwood
d772f64c30 handle errors from os.MkdirAll 2021-01-30 20:59:44 -05:00
Dave Yarwood
3e1d7d587d use bright yellow instead of yellow 2021-01-28 22:38:31 -05:00
Dave Yarwood
e50f2512bd improve the error message that you get when you try to find a player with an unrecognized ID 2021-01-25 21:28:16 -05:00
Dave Yarwood
32674a18d0 aesthetic tweaks 2021-01-19 21:29:09 -05:00
Dave Yarwood
8a88454a3d improve error messages about failure to start player processes 2021-01-19 12:50:25 -05:00
Dave Yarwood
0a1b2475da add incremental progress to alda export output 2021-01-09 21:07:45 -05:00
Dave Yarwood
673a6ce851 use an environment variable (ALDA_DISABLE_SPAWNING) to explicitly disable spawning in CI builds 2020-11-27 14:02:17 -05:00
Dave Yarwood
e0c1c53089 tweak player-spawning parameters
With the previous settings, I was finding it too easy during regular REPL usage
to end up with no players available and have to wait for a new one to spawn.

Increasing the number of desired players from 2 to 3 also helps a lot to ensure
that enough players are available when playing a bunch of score files in rapid
succession with `alda play`. With these new settings, I was able to go through
all of the example scores in the repo one by one and play them (overlapping)
with `alda play` and it worked out great!
2020-08-17 20:32:54 -04:00
Dave Yarwood
c1039d2986 make FindOpenPort a publicly accessible utility function 2020-08-11 21:25:43 -04:00
Dave Yarwood
120e7512cb fix windows compatibility issue in client/player version comparison 2020-07-12 22:30:01 -04:00
Dave Yarwood
e0ec3416ee refactor: organize common code (player management, await util function) into separate packages 2020-07-12 21:06:56 -04:00