Consider removing the faker dependency
See original GitHub issueThe problem
faker
uses 7.6M of disk as of writing. For users who aren’t using its features, this is a pretty heavy cost.
It includes a generator for license plates, SSN, ISBN, etc…
Proposed solution
Consider removing the faker dependency, allowing users to plug it if they need it.
This solution would also allow users to control how the faker factory is used and specify its locale, for instance.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (12 by maintainers)
Top Results From Across the Web
The npm faker package and the unexpected demise of open ...
The new 6.6.6 version completely removed all traces of the original source code of the Faker.js npm package. Any new installs of this...
Read more >The right to delete: how faker.js exposed ... - The Ginger Viking
When the author of faker.js decided to delete his entire repository, it caused thousands of other codebases to break.
Read more >cannot find module faker after npm install --save-dev
Following the answer of akop below, the safest way seems to switch to faker-js yarn remove faker yarn add --dev @faker-js/faker.
Read more >The right to delete: how faker.js exposed the fragile ... - Reddit
Pulling down your dependencies should be a completely different process from building, and pulling down those dependencies should *always* be ...
Read more >Dev corrupts NPM libs 'colors' and 'faker' breaking thousands ...
Users of popular open-source libraries 'colors' and 'faker' were left ... "Removing your own code from [GitHub] is a violation of their ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would argue that removing faker is a strictly better design, applying the single responsibility principle. Factoryboy already has a lot of value without using faker at all. This would add a lot of flexibility in choosing how fake values are generated.
But sure, this would definitely be a breaking change. I think this is achievable using setuptools extras, and would only require users to change the package they install without changing any code.
On Thu 1 Aug 2019 at 11:57, Raphaël Barrois notifications@github.com wrote:
I’ll try to sum up the current situation:
pip
andsetuptools
there).What is the actual issue here?
factory_boy
is intended as a development tool. It’s obviously better to reduce the size when possible, but are those 11MB a problem in development platforms?If we want to reduce the space used by factory_boy, I see 2 options:
Currently, factory_boy has a hard dependency on faker; making that optional would require every user of factory_boy+faker to change from
factory_boy
tofactory_boy[faker]
in their dependencies… which I’d rather avoid. Another option would be to publish two releases (factory_boy & factory_boy_minimal)?All that is quite a lot of work for the project team and possibly for end users.