freeCodeCamp / freeCodeCamp/devdocs
Problems upgrading gems
- Lenguaje dominante
- Ruby
- Estrellas
- 39.5k
- Forks
- 2.6k
- Merge medio
- 4 d 32 min
- PR fusionados (30 d)
- 13
Descripción
As it stands several key gems cannot be upgraded because of version conflicts. Specifically, v4 of `sinatra` depends on `rack (>= 3, < 4)` and that conflicts with `sprockets-sass`. This is because DevDocs depends on `sprockets-sass`, but the latest version of _that_ is only compatible with `sprockets < 4` and finally `sprockets 3.75` (the highest version compatible with `sprockets-sass`) requires `rack <3`.
In short, we can't upgrade `sinatra` or `rack` because there's no compatible version of `sprockets-sass` and that's unmaintained at this point.
## What sprocket-sass is doing
It enables `@import` statements to work in .scss files, including when the imported file is an ERB that in turn compiles to SCSS (that compiles to CSS). The main place this happens is
https://github.com/freeCodeCamp/devdocs/blob/2c5b5bd25985101fa2f06c28bb9bae15d821bfbc/assets/stylesheets/application.css.scss
## What can be done
I see two potential paths forward
1. Fork `sprockets-sass` and make it compatible with `sprockets` 4 (and Ruby 3)
2. Inline the imports and convert `application.css.scss` to `application.css.scss.erb`, which _should_ work since the issue `sprockets-sass` solved was specifically `@importing` files, not compiling .erb files.
I'm not sure how long 1. would take. I looked into it, but I didn't make much headway.
Option 2. would be ugly, but not awful. Reason being, the imported files are not used more than once, so the code wouldn't get any less DRY. We would end up with one massive file, though.
Guía de contribución
Línea de trabajo
Comienza con las restricciones de dependencias descritas en el issue e inspecciona assets/stylesheets/application.css.scss, especialmente el uso de @import. Determina si el proyecto debe reemplazar sprockets-sass o revisar esa hoja de estilos y, después, verifica que la opción elegida permita las actualizaciones de Sinatra, Rack, Sprockets y Ruby. Se considera terminado cuando el conflicto de dependencias se resuelve sin romper la compilación de la hoja de estilos.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- ruby
- Área
- backend, build-system
- Tipo de issue
- Refactorización
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 30/100