Skip to content

Stack builds packages when called with --only-dependencies in some multi-package projects  #3476

Closed
@rjmk

Description

@rjmk

General summary/comments

If you have a project with packages a and b, and b depends on a, stack build --only-dependencies will build a.

Bisecting, this change was introduced in d1e6c48. I'm not sure if it was introduced intentionally or not. If it's unclear why some might prefer this behaviours absence, consider building pedantically. You don't want to to be responsible for warnings in all your dependencies, so would rather build deps first unpedantically, and then be able to build all your own packages pedantically.

Steps to reproduce

  1. Make a stack project with two packages in sub-directories.
  2. Have one package depend on the other.
  3. stack build --only-dependencies

Expected

I expect neither of the packages to build

Actual

The depended-on package builds

Stack version

$ stack --version
Version 1.5.1, Git revision 600c1f01435a10d127938709556c1682ecfd694e (4861 commits) x86_64 hpack-0.17.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions