remove cds-dk installation from build script of db#184
Conversation
Is this order modelled somewhere explicitly? |
I'm not sure, but it looks like it's the order of the modules in the mta.yaml: srv, db, app. At least it's my experience with this project and mbt. |
|
Verified it, it's the order of the modules in the mta.yaml. If I change the order to db, srv, app, first the db module is built. Since the node_modules folder is not existing, the globally installed cds-dk is used: With the build order srv, db, app the cds-dk is used from the local installation: |
|
Can this be modelled somehow explicitly? Not sure, if this is considered an implementation detail by mbt build or if this is documented behaviour. We need to be careful to rely on that if this behaviour is not considered as "API" |
Yes, it's possible to maintain a build order of the modules. Further details can be found here: https://sap.github.io/cloud-mta-build-tool/configuration/#defining-module-build-order |
beckermarc
left a comment
There was a problem hiding this comment.
I'm fine with this, not sure what @BraunMatthias thinks, as we now deviate again from the defaults :D
This PR removes the @sap/cds-dk installation from the build script in db/package.json. Now, the build script relies on a previous local installation of the cds-dk, e.g. done with a maven build. Or a globally installed cds-dk version is used.
The mbt build works fine, because first the srv module is built, then the db module.