nodejs / version-management

Discussion Group for Version Management
MIT License
42 stars 14 forks source link

standardize install paths and path resolving methods for version managers #3

Open MylesBorins opened 7 years ago

MylesBorins commented 7 years ago

If the project standardized a way of managing paths + where files are stored we could allow for multiple version managers to work together transparently.

edit: this could also allow an electron based installer and command line application to both work with the same source

edit 2: it may also be possible to separate the concerns of path management from installing packages. This way we could have a platform agnostic method for installing files, and a platform or shell specific way of managing the path. /cc @ljharb

marcelklehr commented 7 years ago

I'm afraid I don't understand the motivation. Both, installation and path management separated, would have to be part of a cross platform version manager anyhow, right? How is standardization useful beyond a single version manager (you propose multiple version managers)? A question I'd ask myself as a down-stream dev: If I have to install a version manager separately that adheres to a standard anyway, why couldn't the official package supply the necessary cli by default? I think we should standardize a CLI (like git) rather than a folder structure. Toolbar extensions and IDE plugins or similar could then use that CLI without knowing the internals.

marcelklehr commented 7 years ago

I agree that separating the concerns (within a converged solution) of path management from installing versions makes sense and would allow for easier portability.

Trott commented 6 years ago

I think it would be great to document standard paths in the nodejs/node repo somewhere. We don't need to list every possible path. At a minimum, we just need to list the places that the official installers put the system binaries. We definitely don't need to codify individual user paths right off the bat (so we don't have to debate ~/.nvm/ type stuff), although maybe that can come later (or maybe not). And we can probably skip stuff like yum and brew for now.

@MylesBorins @ljharb Can we try to assemble a complete-ish list here and then someone can PR it into the main node repo in the docs somewhere? Certainly no harm in documenting it, right? @nodejs/build @nodejs/release

ljharb commented 6 years ago

That sounds great! Starting by documenting existing paths is a great plan.

However, I think what we should settle on eventually is a single standard path convention for "where node goes", by version, both for "system" and for "within a single user" - other tools can do the work to conform to that, and it can be clearly documented that installing node elsewhere comes with caveats.