The --production option is not very appropriately named because it's easy to assume it means running shards (especially shards build in "production mode"). Instead, its behaviour is only related to dependency resolution (and even that is not strongly tied to production environments). It has two effects which should be available as separate options. For example, in a CI environment you may want to install only from lockfile but also install development dependencies.
--frozen: only install locked dependencies and fail if shard.yml contradicts shard.lock
--without-development: don't install development dependencies
--deployment: The combination of the above (currently --production)
The latter could stay as --production, but I'd rather have a better fitting name. --deployment is used by bundler, too. This should also fail if shard.lock is missing (also like bundler).
The
--production
option is not very appropriately named because it's easy to assume it means running shards (especiallyshards build
in "production mode"). Instead, its behaviour is only related to dependency resolution (and even that is not strongly tied to production environments). It has two effects which should be available as separate options. For example, in a CI environment you may want to install only from lockfile but also install development dependencies.--frozen
: only install locked dependencies and fail ifshard.yml
contradictsshard.lock
--without-development
: don't install development dependencies--deployment
: The combination of the above (currently--production
)The latter could stay as
--production
, but I'd rather have a better fitting name.--deployment
is used by bundler, too. This should also fail ifshard.lock
is missing (also like bundler).Related to #372