[draft] Tool management requirements#13457
Conversation
7f68d71 to
884541d
Compare
|
@shonfeder I've gone through my own design notes and prototype to update this document. As it stands it is still a WIP however there is much more material that can be fleshed out and discussed. I've split the requirements into functional requirements and a technical specification, although it isn't perfect. I included my own research on similar features from other package managers, but this could be expanded further. Hopefully this closes the gap between what we dissected and what I had in the prototype. The CRs should answer most questions you have reading the docs, but further changes and additions/deletions are welcome. The end-goal will be to address all the CRs so they are not a permanent feature. |
Sudha247
left a comment
There was a problem hiding this comment.
Thanks for writing this down, this is very useful. I read through parts of the document and some comments below. Will do another pass later.
|
|
||
| CR-soon Alizter: Edge cases to specify: | ||
|
|
||
| - Tool not locked: error with suggestion to run `dune tools add`? |
There was a problem hiding this comment.
Any downsides to automatically locking and installing when the tool is not found?
There was a problem hiding this comment.
The problem is that in that case the command that would launch the dev tool locks up for an extended time period with no good way to communicate to the caller that it's locking, downloading and building the dev tool.
It might still be worthwhile but its good to have this issue in mind when designing.
Leonidas-from-XIV
left a comment
There was a problem hiding this comment.
Thanks for pushing this along. It's one of the most important things in package management (arguably even the most) and I appreciate that this is starting to move along.
|
|
||
| - **Generality**: Any opam package providing executables can be a tool | ||
| - **Orthogonality**: Tools are solved independently from project dependencies | ||
| - **Clean source tree**: All tool artifacts live in `_build/`, not your repo |
There was a problem hiding this comment.
"work tree" is probably the better wording here.
|
|
||
| CR-soon Alizter: Edge cases to specify: | ||
|
|
||
| - Tool not locked: error with suggestion to run `dune tools add`? |
There was a problem hiding this comment.
The problem is that in that case the command that would launch the dev tool locks up for an extended time period with no good way to communicate to the caller that it's locking, downloading and building the dev tool.
It might still be worthwhile but its good to have this issue in mind when designing.
Adds reference docs for `dune tools` as stated in ocaml#14184. The implementation of dev tools is subject to change, as being discussed in ocaml#13457. But parts of the user facing commands might stay and we might want to update the docs as the implementation is being fleshed out. Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
Adds reference docs for `dune tools` as stated in ocaml#14184. The implementation of dev tools is subject to change, as being discussed in ocaml#13457. But parts of the user facing commands might stay and we might want to update the docs as the implementation is being fleshed out. Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
Adds reference docs for `dune tools` as stated in ocaml#14184. The implementation of dev tools is subject to change, as being discussed in ocaml#13457. But parts of the user facing commands might stay and we might want to update the docs as the implementation is being fleshed out. Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
Adds reference docs for `dune tools` as stated in ocaml#14184. The implementation of dev tools is subject to change, as being discussed in ocaml#13457. But parts of the user facing commands might stay and we might want to update the docs as the implementation is being fleshed out. Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
|
|
||
| CR-soon Alizter: `dune tools path` behavior is underspecified: | ||
|
|
||
| - Should `path` trigger download and build if not yet built? Or only return path |
There was a problem hiding this comment.
Another option could be to provide a warning that the tools are not built while returning the path. However, I'd imagine consumers of this could be other platform tools. In that case wouldn't having a hard error break their workflows?
Sudha247
left a comment
There was a problem hiding this comment.
It's good to see this moving along! I'm of the belief that this is one of the most important, if not the most important, features for Dune package management. Thanks for pushing this along @Alizter and @shonfeder.
I'm generally happy with the direction this is moving along. However, I think we still have some open questions to address before we can merge this.
|
|
||
| #### 6.2. Automatic updates | ||
|
|
||
| Tools do not auto-update; explicit user action is required. |
There was a problem hiding this comment.
I want to make a note here that this differs from the auto-locking model we have been discussing in #13011. It could be the case that the two of them have different needs and hence different models. However, it's worth documenting why that is. Both of them share several similar concerns:
- It was stated in the quoted issue that users find it tedious to maintain lockfiles. Even though there is no explicit lock file visible to the user, that concern still applies here.
- Why is the model for deps to update by default when we run
dune build, and not the case for tools? - This model also makes offline mode a possibility, which is still an open problem for dependencies.
| ;; Using a binary package repository | ||
| (tool | ||
| (package ocaml-lsp-server) | ||
| (repositories binary-packages)) |
There was a problem hiding this comment.
This example is perhaps not in line with 6.5, which states that tools are always built from source.
|
|
||
| ## Learnings from the Prototype | ||
|
|
||
| CR-soon Alizter: This entire section may be considered garbage. Extract |
There was a problem hiding this comment.
This needs a pass before merging.
Signed-off-by: Shon Feder <shon.feder@gmail.com>
Signed-off-by: Ali Caglayan <alizter@gmail.com>
Let's add this back when the document takes shape to clarify confusion. At the moment it is not adding anything and is potentially confusing. Signed-off-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Ali Caglayan <alizter@gmail.com>
- It shouldn't mention implementation details (switch etc.) - It is too constrained (excluding tools defined in a project build) - Given unnecessary context (mentioning current design) - Does not include wide enough examples of tools (only mentions tools we widely used and already supported with bespoke mechanisms) Signed-off-by: Shon Feder <shon.feder@gmail.com>
Signed-off-by: Shon Feder <shon.feder@gmail.com>
This is essential for clear communication, otherwise key terms get used inconsistently or understood ambiguously. As a result of recovering terminology we also detect an error in the "generality" principle: packages themselves are not tools, but they provide tools so "any opam package ... can be a tool" is a category mistake. Signed-off-by: Shon Feder <shon.feder@gmail.com>
This is not a useful section: things that aren't required just don't need to be listed as requirements. The canonical way of differentiating necessary from merely recommended requirements is MUST vs. SHOULD (or RECOMMENDED): https://www.ietf.org/rfc/rfc2119.txt Signed-off-by: Shon Feder <shon.feder@gmail.com>
Signed-off-by: Shon Feder <shon.feder@gmail.com>
Signed-off-by: Shon Feder <shon.feder@gmail.com>
Signed-off-by: Shon Feder <shon.feder@gmail.com>
Relevant parts extracted from issues on the issue tracker tagged 'dev-tools' Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
Signed-off-by: Shon Feder <shon.feder@gmail.com>
Signed-off-by: Shon Feder <shon.feder@gmail.com>
Signed-off-by: Shon Feder <shon.feder@gmail.com>
Links aren't rendered in summary tags, and we will have additional details we want to add probably, so let's make the collapsed section more general. Signed-off-by: Shon Feder <shon.feder@gmail.com>
Signed-off-by: Shon Feder <shon.feder@gmail.com>
It didn't make sense in the req it was under, and indeed we didn't have a req for it. Signed-off-by: Shon Feder <shon.feder@gmail.com>
Signed-off-by: Shon Feder <shon.feder@gmail.com>
Signed-off-by: Shon Feder <shon.feder@gmail.com>
Signed-off-by: Shon Feder <shon.feder@gmail.com>
Signed-off-by: Shon Feder <shon.feder@gmail.com>
Signed-off-by: Shon Feder <shon.feder@gmail.com>
Signed-off-by: Shon Feder <shon.feder@gmail.com>
Signed-off-by: Shon Feder <shon.feder@gmail.com>
Signed-off-by: Shon Feder <shon.feder@gmail.com>
Signed-off-by: Shon Feder <shon.feder@gmail.com>
To be added back in a new branch, and staged as its own PR. Signed-off-by: Shon Feder <shon.feder@gmail.com>
This proposes a set of high level, functional requirements for our tooling management functionality.
Fixes #15545
The requirements proposed here are informed by our experience with the current prototype, our use of other successful tools addressing this problem space, and by recent design discussions.