simondotm / nx-firebase

Firebase plugin for Nx Monorepos
https://www.npmjs.com/package/@simondotm/nx-firebase
MIT License
175 stars 31 forks source link

Deleting a function project using file system leaves implicitDependency in firebase app #231

Open simondotm opened 2 months ago

simondotm commented 2 months ago
  1. Generate a firebase function linked to a firebase app in the workspace
  2. Delete that firebase function's directory from the workspace using just the filesystem
  3. Try to run the sync generator
  4. Note that Nx is unhappy because the deleted firebase function remains an implicitDependency of the project, so sync cannot do its work to cleanup because it cant read the projectGraph

It would be handy to be able to just delete a function project folder, rather than using nx g rm

   Node   : 18.13.0
   OS     : darwin-arm64
   pnpm   : 8.15.5

   nx                 : 16.8.1
   @nx/js             : 16.8.1
   @nx/jest           : 16.8.1
   @nx/linter         : 16.8.1
   @nx/workspace      : 16.8.1
   @nx/angular        : 16.8.1
   @nx/cypress        : 16.8.1
   @nx/devkit         : 16.8.1
   @nx/esbuild        : 16.8.1
   @nx/eslint-plugin  : 16.8.1
   @nx/node           : 16.8.1
   @nx/rollup         : 16.8.1
   @nrwl/tao          : 16.8.1
   @nx/web            : 16.8.1
   @nx/webpack        : 16.8.1
   typescript         : 4.8.4
   ---------------------------------------
   Community plugins:
   @ionic/angular         : 6.7.5
   @ionic/angular-toolkit : 8.1.0
   @ngrx/effects          : 14.0.2
   @ngrx/router-store     : 14.0.2
   @ngrx/store            : 14.0.2
   @ngrx/store-devtools   : 14.0.2
   @simondotm/nx-firebase : 2.3.0
   angular-calendar       : 0.28.28
   ng2-charts             : 3.1.2
simondotm commented 2 months ago

One possibility is to not even use implicitDependencies in the firebase app project, just have the build step run-many with the firebase app project tag, but it is quite nice that the nx graph shows this relationship between firebase apps and firebase functions.