-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(docs): Improve the toolchain setup page #2272
Conversation
- Give a brief overview of docker+vscode vs native os - Dedicated page for docker+vscode setup - Dedicated page for native os setup - Dedicated page for setting up zmk sources for development
…ns. Expand some notes and caution boxes so some pitfalls and ways to improve performance are more clear to users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a good improvement to me in general, to reduce confusion on what steps to follow and simply our docs.
I have one concern regarding following step 3 (Get Zephyr and install Python dependencies), it also makes you clone Zephyr and run west zephyr-export
on the clone. Since fetching Zephyr will be handled by west update
on the ZMK repo, we should skip that. How about adding some sub-bullet points like below:
3. [Get Zephyr and install Python dependencies](https://docs.zephyrproject.org/latest/develop/getting_started/index.html#get-zephyr-and-install-python-dependencies)
- You can skip the steps starting with "Get the Zephyr source code" and "Export a Zephyr CMake package" since ZMK will fetch its own copy of Zephyr automatically
- ZMK also does not need all of the additional dependencies found in Zephyr's `requirements.txt`, but only those found in `requirements-base.txt`. So you can modify parts of the related commands like below:
```diff
- pip3 install -r zephyr/scripts/requirements.txt
+ pip3 install -r zephyr/scripts/requirements-base.txt
```
Note that I moved the extra info box here as well.
I believe we should keep the "Export Zephyr CMake package" section as well, in that case.
Performed a larger redo of this by combining its content with that found in #437 This updates the approach used there to the modern docs, and continues to leverage the Zephyr docs. The previous comments were both resolved in the process, but another careful look is likely due. Note that there are some blocks written in #437 which I was uncertain about including, so I'm listing them here: :::note Windows Users This approach will also need the Remote - WSL extension installed in VS Code. Files stored within WSL2 can be accessed via Windows Explorer by navigating to I don't know how accurate this is, and Zephyr does not recommend WSL, so I'm not sure this should be included. :::danger The Docker environment will NOT run on arm CPUs like the Raspberry Pi or Apple Silicon. You must use the native environment if using an arm CPU. ::: Googling this seems to imply that there are workarounds, but I do not have access to a device to test it out. It is not included under the current docs, so I don't see a reason to include it until it is brought up by someone. :::caution Windows Users If you're using the Docker environment on Windows, you must checkout the sources to a folder within C:\Users[your_user_here] to avoid a potential permissions issue. If you're using the WSL2 filesystem the sources should go under ~/ to avoid potential permissions issues. ::: I think this is true, but I have not tested. I've included it anyway, as it certainly does not hurt. Thoughts on these would be appreciated. I am aware that there is duplicated content in the Native section - this is because I thought it looked nicer that way, but would be willing to change it upon request. |
I can confirm that it’s working fine on Apple Silicon. I don’t know if the zmk images have ARM versions. So it might be running using emulation, but it works just fine on Apple silicon and doesn’t need any special configuration. |
…be there, squashed commits
fb395d4
to
12f0f1a
Compare
FYI I'll try to review this weekend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While it seems like a decent improvement, I have to say incorporating #437 into this PR has made it much harder to review. It also is too verbose in some places IMO, which I tried to address in comments.
I also gave up on adding comments to the native page after a while because of the content duplication, I think it will make maintenance harder.
Thanks for making the requested changes from earlier.
To address the points in your comment:
While the WSL un-recommendation doesn't apply to most ZMK users (because of uf2 flashing) I wouldn't put any WSL-specific instructions in our docs anyway. Users can simply follow the corresponding Linux distro instructions.
I agree, it shouldn't be our responsibility to teach this to users.
I don't think this is very necessary either, but we can keep it I guess.
Like I noted in the review, I'd take the worse look over the maintenance difficulty. |
Removing detail from VSCode note Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Did the necessary refactoring to make maintenance easier at the cost of appearance. Two points from the previous review are not marked as resolved, the rest should be fine now I think. EDIT: Also, my apologies for the increased review difficulty! Thanks for putting in the time. My hope is that by doing this refactoring into multiple pages, future improvements (like devcontainers) will be easier to review, making up for this. |
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again, the deduplication helped a lot. Can we do the same for the glob
tab? Steps 2 and 3 seem to be identical.
Regarding the bullet points in the getting started page: Maybe we can integrate the following paragraphs into the bullet points? This way there is less repetition, but still visual separation.
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
I deduplicated the glob tab, but in a slightly awkward way by getting rid of the function exporting the OsTabs environment. glob needing two tabs on 1 and 4 looks horrible, so I introduced a css class to just hide the second tab menu while keeping the switching functionality. There ought to be be a better way to do this, but I don't know if or how. Tried integrating the bullet points, I quite like it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I personally think the hack is fine but we can see if anyone disagrees.
I am generally happy with this, but given the scope of changes we should see if anyone else from @zmkfirmware/docs has comments?
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
I re-added the missing information and made the information in the ubuntu section a bit nicer too -- this is exactly what "note" blocks are for, imo. I have no idea if the powershell script works either, though. |
I'll do a final pass and if everything's good I'll merge tomorrow, unless anyone has objections. |
Making the changes discussed on Discord. In particular:
Further improvement could be made by identifying a better way to handle Raspberry OS, since it is an outlier, but I feel that this is good enough for now.