spago
                                
                                 spago copied to clipboard
                                
                                    spago copied to clipboard
                            
                            
                            
                        `spago install` `git clone`s for same monorepo package multiple times
having same package, with only subdir is different
    deku:
      git: https://github.com/mikesol/purescript-deku.git
      subdir: deku
      ref: main
    deku-core:
      git: https://github.com/mikesol/purescript-deku.git
      subdir: deku-core
      ref: main
    deku-css:
      git: https://github.com/mikesol/purescript-deku.git
      subdir: deku-css
      ref: main
    deku-dom:
      git: https://github.com/mikesol/purescript-deku.git
      subdir: deku-dom
      ref: main
it will
 ~/projects/deku-documentation $ spago build --pedantic-packages
Reading Spago workspace configuration...
✅ Selecting package to build: deku-documentation
Cloning https://github.com/mikesol/purescript-deku.git
Cloning https://github.com/mikesol/purescript-deku.git
Cloning https://github.com/mikesol/purescript-deku.git
Cloning https://github.com/mikesol/purescript-deku.git
Downloading dependencies...
multiple times. Very long
Expected: uniq before cloning?
Full spago.yaml
package:
  name: deku-documentation
  publish:
    version: 0.9.24
    license: "Apache-2.0"
  dependencies:
    - free
    - deku
    - deku-core
    - deku-dom
    - yoga-fetch
    - yoga-json
    - affjax-web
    - affjax
    - profunctor-lenses
    - string-parsers
    - tidy-codegen
    - aff
    - routing-duplex
    - random
    - argonaut-core
    - fetch
    - routing
    - filterable
    - qualified-do
    - canvas
    - uint
    - arraybuffer
    - avar
    - web-pointerevents
    - web-touchevents
    - stringutils
workspace:
  backend:
    cmd: purs-backend-es
    args:
      - build
  package_set:
    registry: 50.4.0
  # yq '.workspace.extra_packages | keys[]' spago.yaml | grep -v "deku" | xargs -I {} rm -rdf ".spago/p/{}"
  extra_packages:
    hyrule:
      # git: https://github.com/mikesol/purescript-hyrule.git
      # ref: master
      git: https://github.com/srghma/purescript-hyrule.git
      ref: hyrule-master
    bolson:
      # git: https://github.com/mikesol/purescript-bolson.git
      git: https://github.com/srghma/purescript-bolson.git
      ref: main
    deku:
      git: https://github.com/mikesol/purescript-deku.git
      subdir: deku
      ref: main
    deku-core:
      git: https://github.com/mikesol/purescript-deku.git
      subdir: deku-core
      ref: main
    deku-css:
      git: https://github.com/mikesol/purescript-deku.git
      subdir: deku-css
      ref: main
    deku-dom:
      git: https://github.com/mikesol/purescript-deku.git
      subdir: deku-dom
      ref: main
    dodo-printer:
      # git: https://github.com/natefaubion/purescript-dodo-printer.git
      git: https://github.com/srghma/purescript-dodo-printer.git
      ref: master
    tidy:
      # git: https://github.com/natefaubion/purescript-tidy.git
      git: https://github.com/srghma/purescript-tidy.git
      ref: main
      subdir: lib
    tidy-codegen:
      # git: https://github.com/natefaubion/purescript-tidy-codegen.git
      git: https://github.com/srghma/purescript-tidy-codegen.git
      ref: main
Yes, this is an optimisation that we should implement. Right now we do the naive (but correct) thing of just cloning the repo for each of the packages - we could instead detect if we already have the repo, copy it over to the other package, and then checkout the right branch.