Is recursive disk search desired/intended?

Abierto
#437 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
rust, vim

Línea de trabajo

Read the linked ftplugin/rust.vim lines 17–23 to understand the recursive search and how it selects makeprg. Decide whether Cargo should be the default or whether a global setting should control the search; the issue does not record a decision. Done means agreeing on the intended behavior and updating the Rust file-opening behavior accordingly.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Right now, every time a rust file is opened, a recursive disk search is done until either the root is reached or cargo.toml is found: https://github.com/rust-lang/rust.vim/blob/87c745d8d506fc1eecc1d81df15d5bde1658a2fc/ftplugin/rust.vim#L17-L23

Maybe cargo build should just be the default? I imagine few users use the behavior where makeprg builds the current file into an executable directly using rustc (which is what makeprg will do if no cargo.toml is found). If anyone exactly wants this exact behavior, they could also just add it to their own after/ftplugin/rust.vim. Alternatively, maybe this search should be hidden behind a global setting which is off by default?

Not sure how much this really matters in practice, so this might be premature optimization. However, opening a rust file really shouldn't trigger this much filesystem access. This isn't a zero cost abstraction : ).

Related: https://github.com/ziglang/zig.vim/pull/40#discussion_r578754774

Lenguaje dominante
Vim Script
Estrellas
4.2k
Forks
323
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de rust-lang/rust.vim

Todos los issues de rust-lang/rust.vim

Issues similares

Más issues de DevTools

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.