-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monorepo structure #3656
Comments
Drawback of the "full integration" approach: the |
My first impression is that it'd be easiest to start with the "checked in |
Lerna has been perfectly nice for Turf, but I don't think it would really pay off in this situation given the relatively few consumers of style-spec, shaders, and function. It definitely does introduce some uncertainty and complexity into the situation, since it's designed for dependencies to be versioned semi-independently too. The full integration approach feels right to me, but that may just be because I've never worked on or encountered it in production. |
Very much in favor of doing this — we could get a huge productivity boost! Not a fan of the Before we start merging the repos, we need to do some clean up first — going through all dependencies, making versions consistent with those in |
My concern here would be conflating the EDIT: Rereading, sounds like we wouldn't be including mapbox-gl-native in the scope of this monorepo?
^ seems a bit awkward |
Would this be so bad? Here's a full list of non-dev dependencies that would be added from a naive merge of
|
The problem is they can't, really; not if |
Ah. That is tricky. Because this is an internal edge case, we could consider a workaround like
|
It feels like an actionable path forward is merging here. Remaining questions for all:
|
This is mostly done. Specific follow-ups are ticked separately. |
amazing 💪 @lucaswoj !! 🙇♀️ |
How should we organize the monorepo? Let's start with mapbox-gl-js, mapbox-gl-test-suite, mapbox-gl-style-spec, and mapbox-gl-shaders.
Of these, the only two we currently publish as independent packages are mapbox-gl-js and mapbox-gl-style-spec. mapbox-gl-native will depend on a mapbox-gl-js commit hash and pull style-spec, shaders, and test-suite from there.
Possible structures include the following
The "checked in
node_modules
" approachmapbox-gl-js
bench
,debug
,js
,plugins
, etc.node_modules
mapbox-gl-test-suite
mapbox-gl-style-spec
mapbox-gl-shaders
I haven't had good experiences with checking in portions of
node_modules
, so I'm not inclined to try this approach.The "semi-lerna" approach
mapbox-gl-js
bench
,debug
,js
,plugins
, etc.packages
mapbox-gl-test-suite
mapbox-gl-style-spec
mapbox-gl-shaders
Here we'd keep the existing
mapbox-gl-js
structure, but use lerna to manage the integrated dependencies. I don't know if lerna actually supports this.The "full-lerna" approach
mapbox-gl
packages
mapbox-gl-js
bench
,debug
,js
,plugins
, etc.mapbox-gl-test-suite
mapbox-gl-style-spec
mapbox-gl-shaders
I believe this is how lerna is intended to be used.
The "full integration" approach
mapbox-gl
bin
(merged from mapbox-gl-js and mapbox-gl-style-spec)bench
,debug
,js
,plugins
, etc. (from mapbox-gl-js)lib
,reference
,migrations
, etc. (from mapbox-gl-style-spec)shaders
test
(merged from mapbox-gl-js and mapbox-gl-style-spec)test-suite
data
,query-tests
,render-tests
, etc.package.json
(merged from all repos)The idea here is that we'd fully integrate all four repos, with extensive merging and massaging of their structure. We'd stop publishing mapbox-gl-style-spec as an independent package.
This feels like the right approach to me. It's also most likely the most amount of work.
Whatever structure we decide on, I think we should fully script the restructuring, so that we can cleanly cut over from the current state of all the repos without a period where we have to maintain two structures.
Thoughts?
The text was updated successfully, but these errors were encountered: