-
Notifications
You must be signed in to change notification settings - Fork 17
Working with a local build
When working on local changes to Myst, it's likely that you'll also have a global installation around (either through brew install
on a mac, or other means). This can get confusing when working with a local ./myst
or ./bin/myst
build, since the global myst
binary will also be on the path and may get used instead.
A simple improvement to help clear up confusion (and to keep from having to remember the ./
all the time) is to make a symlink to ./bin/myst
somewhere on your $PATH
with a different name - something like myst-dev
. All it takes is a single symlink line:
ln -s `pwd`/bin/myst /usr/local/bin/myst-dev
The target of the link (./bin/myst
in the above line) is the binary with your local changes. The location of this file depends on how you built the binary. Using just crystal build src/myst.cr
, the path will be ./myst
(as long as you compiled from the root directory of the project), but using shards build
will create the binary at ./bin/myst
as shown above.
A good general workflow is to use crystal build src/myst.cr
to test that the project compiles successfully and fix any errors, then use shards build
to create a binary that will be symlinked. This way, myst-dev
should always link to a successfully-built binary.