Do not generate colors phf map at compile time
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- rust
- Domain
- build-system
Research direction
Start by locating the colors map generation in the cssparser-macros code and compare the proposed prebuilt-file approach with the linked svgtypes colors.rs. Check the dependency tree before and after; done means the colors map is kept in source form without requiring phf_codegen and its generator dependencies at compile time.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Rust
- Stars
- 869
- Forks
- 152
- Avg merge
- 15h 8m
- Merged PRs (30d)
- 12
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from servo/rust-cssparser
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
servo/rust-cssparser#440 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
servo/rust-cssparser#439 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
servo/rust-cssparser#434 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
servo/rust-cssparser#438 · 3 comments · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 28/100
servo/rust-cssparser#436 · 1 comment ·
All issues in servo/rust-cssparser
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug team:backend track:services-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cowprotocol/services#4950 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·