kentcdodds / webpack-validator-DEPRECATED

Use this to save yourself some time when working on a webpack configuration.
MIT License
93 stars 8 forks source link

Externalize postcss validator into own package #40

Closed jonathanglasmeyer closed 8 years ago

jonathanglasmeyer commented 8 years ago

As discussed in #20, i extracted postcss loader into an own package.

So right now the user would have to explicitly install the validator plugin and set it up themselves. Automation & install hints etc. are still a todo.

Stuff I'm not 100% sure about: how should dep versions of the "blessed" externalized validators be handled? Wildcard? Pinned?

kentcdodds commented 8 years ago

how should dep versions of the "blessed" externalized validators be handled? Wildcard? Pinned?

I think let's do range with ^... Thoughts? :thought_balloon:

kentcdodds commented 8 years ago

So right now the user would have to explicitly install the validator plugin and set it up themselves. Automation & install hints etc. are still a todo.

I think that's fine for now :+1:

jonathanglasmeyer commented 8 years ago

It'd awesome to autoupdate them with greenkeeper, no need to think about this at all then. :)

xjamundx commented 8 years ago

What about that monorepo architecture? Something to consider here...

On Sat, Mar 19, 2016 at 10:17 AM Jonathan Werner notifications@github.com wrote:

It'd awesome to autoupdate them with greenkeeper, no need to think about this at all then. :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/kentcdodds/webpack-validator/pull/40#issuecomment-198750997

jonathanglasmeyer commented 8 years ago

Looking at babel repo structure, core packages are in one repo. Third party plugins are in own repos, though. Same for eslint. This is good in the long run as it decreases burden of core maintainers to handle issues of third parties. It also gives plugin authors autonomy in code style preferences and testing framework.

xjamundx commented 8 years ago

My opinion is that external plugins is a last resort

On Sat, Mar 19, 2016 at 10:24 AM Jonathan Werner notifications@github.com wrote:

Looking at babel repo structure, core packages are in one repo. Third party plugins in own repos, though. Same for eslint.

— You are receiving this because you commented.

Reply to this email directly or view it on GitHub https://github.com/kentcdodds/webpack-validator/pull/40#issuecomment-198752571

jonathanglasmeyer commented 8 years ago

Could you elaborate? My impression is that eslint-plugin-* and babel-plugin-* architectures have enabled the growth of ecosystems for those tools.

The only disadvantage Babel 6 had was exposing to much choice to end users. You def need curation for such architectures, i.e presets or builtins.

kentcdodds commented 8 years ago

I think Jamund would prefer that this has all validators built in?

jonathanglasmeyer commented 8 years ago

I got that, but would be interested in the why, taking into account the stuff discussed in #17 and #20.

kentcdodds commented 8 years ago

What about that monorepo architecture? Something to consider here...

I like that idea. We're already experiencing cross-cutting concerns between configuration-validator and webpack-validator. It'd be nice to have at least those two in this same repo. And putting plugins in like babel has done would probably be handy too for tooling and integration testing.

jonathanglasmeyer commented 8 years ago

We're using a monorepo at work. Its awesome, really leveled up our productivity. I'm still wondering what's the best approach for plugins? Do we want to model them as external plugins (although they can be in the same repo) or do we want to handle them just like the core validators?

kentcdodds commented 8 years ago

The only problem I have with including them automatically is it makes it difficult for someone to turn them off if they don't want them. I'm not worried about perf or anything else. We can include hundreds (tens of thousands?) of these validators before we'll notice any slowdown.

So if we can solve the problem of how to disable validators then I say we're fine to make everything included by default.

That doesn't mean that we include them in the core library though. If we did that then we'd be releasing the entire lib every time any validator has a change and I don't want to do that. I'd rather have these each be separate modules that can be updated on their own and then the core lib can reference them as dependencies with a minor patch range.

Thoughts?

sarbbottam commented 8 years ago

What about that monorepo architecture? Something to consider here...

I like that idea. We're already experiencing cross-cutting concerns between configuration-validator and webpack-validator. It'd be nice to have at least those two in this same repo.

My :dollar: 0.02

I would request everyone, to kindly think through the above point and may be some more, before combining or splitting functionalities.

Thanks!

jonathanglasmeyer commented 8 years ago

I think the success of Babels and even face books monorepo approach shows that it's productive doesn't decline with count of contributors. :) Monorepo doesn't imply one package --> modularity isn't necessarily impacted.

I'm wondering how commitizen/automatic releases work with multiple packages in one repo?

sarbbottam commented 8 years ago

Monorepo doesn't imply one package --> modularity isn't necessarily impacted.

Thanks for enlightening, I have been to ignorant to realize that :worried: My arguments are not valid with this respect.

BTW, I am :heart:ing open source, learnt so much, in past two days.

Quick :question:, how is the CI setup, per package or per repo?

jonathanglasmeyer commented 8 years ago

@kentcdodds I think your suggestions are sensible. Disabling should be a straight forward implementation. Totally subscribe to your last paragraph. Let's do it like this. Monorepo with external validators as own packages required as dependencies from core.

jonathanglasmeyer commented 8 years ago

Will close this and revisit this when we have a monorepo.