trungvose/angular-spotify

Question: web-shared-assers implicitDependencies

alvaromartmart opened this issue ยท 3 comments

Hi @trungk18

Could you please share your reasoning about the implicitDependencies configuration between the app and the web-shared-assets lib?

In my mind the web-shared-assets would be an implicit dependency of the angular-spotify app, so that changing assets would trigger a re-build of the main app, and not the other way around.

But I can see in your nx.json that you've set the app as an implicit dependency of the lib.
https://github.com/trungk18/angular-spotify/blob/40e328e67a34eeccd8448ffdc0af68ad7b92d8f9/nx.json#L81

My guess is... maybe it doesn't matter? As both the app and the web-shared-assets artifacts go to the assets library, it should work, but... does it make sense to rebuild the assets on every app change?

Your project is being a great reference for me as I learn how to structure nx workspaces, thanks!

Hey @alvaromartmart, thanks for reaching out. Actually I didn't make that changes. It was created by @nikosanif on one PR.

#41

@nikosanif Could you please help to answer @alvaromartmart question? Maybe it doesn't really matter and we can just remove the implicitDependencies?

Hi @alvaromartmart ! Nice question, thanks for reporting.

I wanted to add a relationship between the main app and the lib in dep-graph, but you are right!
The web-shared-assets lib does not need to be built in every app change.

@trungk18 I will create a PR, removing the implicitDependencies.

Thanks @nikosanif for the swift PR ๐ŸŒŸ
@alvaromartmart Hopefully it answer your question hehe. Thank you so much for dropping by ๐Ÿ™‚