Closed theffc closed 3 years ago
Hi @theffc , thank you for opening this ISSUE and for your feedback, it's very valuable to us! π
You're right, the documentation isn't clear about the workspaces
features. We'll correct it asap.
Furthermore, it is a recent feature that still needs to be improved.
Regarding what you explained, currently the process as we see it should be like this:
rit add repo
command to add this repo.rit add workspace
, then update the workspace.rit add workspace
, then add the new formula with the rit create formula
on the workspace and implement it.Commands for repos
and workspaces
are similars, both will allow the CLI to "see" the formulas available. Workspaces basically just have a higher priority than Repos (if you uses both commands for the same formulas repositories, the workspaces formulas will be executed).
Observation: We still don't have a command to update
workspaces, therefore to do it if the cloned repo is updated from a git tool, you currently have to delete the workspace and add it again.
Hey @theffc, thanks for the insight, we have been discussing for a while about unifying repos and workspaces to make it more clear. But Guillaume pretty much covered it up:
workspaces
to code, develop, edit, and test formulasrepos
to simply download formulas and consume them.Nevertheless, we should update our documentation explaining this
Hey, thanks for the responses! I'm glad my approach was actually appropriate, and now I feel more comfortable with it π Also, if you need something else, just reach out π
Oh, and I really liked the way @GuillaumeFalourd stated different use cases with questions (e.g: "want to execute a formula from a repository?") π Maybe that would actually be good questions to have in the documentation FAQ or somewhere else
Added documentation on the docs project https://github.com/ZupIT/docs-ritchie/pull/60
I'm closing this ISSUE as a section about workspaces has been added to the documentation (the new one using Hugo, that will soon be online) in this PR: https://github.com/ZupIT/docs-ritchie/pull/88/files
Hey guys, I don't know exactly if this is a problem, or if I just misunderstood some commands, or if I couldn't find the right topic in the documentation. And so, I will try to describe what I wanted to do and how I approached it, so you can see if it makes sense and how to better handle similar cases π
Use case
I needed to add a new formula to an already created repository containing other formulas. Since the repository was not created by me, my machine didn't have the behavior of being able to locally edit my new formula while Ritchie automatically watches for those changes.
Approach
I tried to search in the documentation what I could possibly do to have that behavior, and I tried out 3 approaches for this, but they didn't actually solve the problem:
create a new formula with
rit create formula
. It doesn't seem to work with an already created repository, but thinking it again as I am writing, maybe it would work if I had cloned the git repository and then usedrit create formula
and selected "Typed new formula workspace", but that was not clear to me at the time I tried it.add a repo with
rit add repo
. This command apparently works well for using formulas as they are, but it doesn't seem to be suited for updating formulas or adding new ones.using
rit build formula
. I found this in the documentation, but immediately saw that it is now deprecated, and so didn't even try it out.These 3 approaches seemed to be recommended by the docs, and since I thought neither worked out as expected, I decided to search for all available core commands. That was when I discovered
rit add workspace
, but unfortunately I couldn't get exactly what it does from reading the docs, or by usingrit add workspace --help
. Even so, I decided to try it out and it seems to be working like I wanted. I have experiencing some problems when I make specific changes (like renaming files, adding or removing files), but it can be solved by deleting and adding the workspace again.Suggestions (if this use case makes sense)
As I said, I don't even know if I used the correct commands or if my use case is something important, and I have just started using Ritchie. That being said, the following suggestions could make sense and I could help implementing some of them:
improve how Workspace is being described in docs and
--help
: currently workspace is being described as workspace, and so this can make it difficult to understand when to use itadd something in the documentation about developing new formulas inside a repository owned by someone else and which already contain some formulas
see if there is some way to avoid problems regarding renaming/adding/deleting files while developing new formulas
maybe set a new option in
rit add repo
to add a local repo of formulas that would work for this use case π€·Environment:
rit --version
): 2.10.3PS: sorry for this long text and thanks for your attention