Skip to content
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

Do not generate colors phf map at compile time #236

Open
RazrFalcon opened this issue Feb 7, 2019 · 3 comments
Open

Do not generate colors phf map at compile time #236

RazrFalcon opened this issue Feb 7, 2019 · 3 comments

Comments

@RazrFalcon
Copy link

phf_codegen is a pretty big dependency and colors will not change from build to build, so maybe it's better to keep the colors map as a "prebuilt" file? Something like this.

The source of the problem:

cssparser v0.24.1 (./rust-cssparser-0.24.1)                                         
├── cssparser-macros v0.3.4 (./rust-cssparser-0.24.1/macros)
│   ├── phf_codegen v0.7.24
│   │   ├── phf_generator v0.7.24
│   │   │   ├── phf_shared v0.7.24
│   │   │   │   └── siphasher v0.2.3
│   │   │   └── rand v0.6.5
│   │   │       ├── libc v0.2.48
│   │   │       ├── rand_chacha v0.1.1
│   │   │       │   └── rand_core v0.3.1
│   │   │       │       └── rand_core v0.4.0
│   │   │       │   [build-dependencies]
│   │   │       │   └── autocfg v0.1.2
│   │   │       ├── rand_core v0.4.0 (*)
│   │   │       ├── rand_hc v0.1.0
│   │   │       │   └── rand_core v0.3.1 (*)
│   │   │       ├── rand_isaac v0.1.1
│   │   │       │   └── rand_core v0.3.1 (*)
│   │   │       ├── rand_jitter v0.1.3
│   │   │       │   └── rand_core v0.4.0 (*)
│   │   │       ├── rand_os v0.1.2
│   │   │       │   ├── libc v0.2.48 (*)
│   │   │       │   └── rand_core v0.4.0 (*)
│   │   │       ├── rand_pcg v0.1.1
│   │   │       │   └── rand_core v0.3.1 (*)
│   │   │       │   [build-dependencies]
│   │   │       │   └── rustc_version v0.2.3
│   │   │       │       └── semver v0.9.0
│   │   │       │           └── semver-parser v0.7.0
│   │   │       └── rand_xorshift v0.1.1
│   │   │           └── rand_core v0.3.1 (*)
│   │   │       [build-dependencies]
│   │   │       └── autocfg v0.1.2 (*)
│   │   └── phf_shared v0.7.24 (*)

It's like 20 dependencies just to build a phf map, that never changes.

@SimonSapin
Copy link
Member

I generally dislike having generated files in a source repository. And these are build-dependencies, not part of the final binary.

@RazrFalcon
Copy link
Author

Yes, but they are slowing down the build process.

@emilio
Copy link
Member

emilio commented Apr 6, 2024

Happy to take a patch here as long as it's well documented how to tweak it as needed.

Specially since those colors are not gonna change any time soon...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants