Content
Contributing (First Steps) on Mac
Added by Rince wind over 2 years ago
Hi there,
Since one of the first things you wrote is “Get in touch”, I’m doing so :)
Side note: you might want to write in your README under contributing, that the forum is the way to go? I tried it via e-mail and ... it took ages :D
First of all:
I’d love tackle a few small features and bugs myself but I have to say, I’m having a hard time understanding how the code works and where the stuff is located I have to change. Even though you have a beautiful documentation, I’m having a hard time understanding how you came up with your directory structure. For instance: It took me quite some time to understand that the folder “spec” contains tests. I’ve never heard of tests being referred as “spec”. I didn’t read that far in the documentation at that point to be honest, after reading “Testing Openproject” it was clear but if you just use the search engine from GitHub it can get quite confusing.
I’m also not getting behind the “core” “features” and “shared” folders in the frontend source. All I know is I never end up in the correct folder by the first guess. Would be great, if you could explain that very quickly.
Some small feedback on the MacOS development environment:
It was surprisingly straight forward. Although here are the things I had to do differently:
- Both nodenv init and rbenv don’t work out of the box for fish. I didn’t look further into it but since zsh (and not bash) is now the new default for MacOS you might put a trouble shooting hint in there, that one has to keep his shell in mind.
- On Apple Silicon the Postgres database is not installed at /usr/local/... anymore but in /opt/openproject/…
- I had to run “gem install bundler” as sudo. Very much possible that that’s due to the increased security coming with macOS Catalina and onward.
- Its worth noting that I symlinked /usr/local/bin into the new home-brew location on Apple Silicon. So in case anyone ever has major problems with the PATH… I’d highly recommend doing it anyway.
Everything else worked great!
The tests are a hole other story. I had to install Chrome in order to make them “compile” at all. After installing the tests still fail. I’m pretty sure it’s because Chrome just works differently on MacOS? I have no way to confirm that though. Do you have any experience on running the tests on MacOS?
Also, I'd be really interested to hear from anyone about your development environment -- what IDE do you use etc...
Best, Rincewind
Replies (6)
Hi Rincewind
there is a lack of docs for M1, its brand new.
If you like to contribute: Feel free to add your commits to the documentation on your fork of openproject for M1 on MacOS here:
Please add those to the "release/12.0" branch, later use the current release branch
https://www.openproject.org/docs/development/development-environment-osx/
If you like to develop: please try to use the docker dev environment for your M1 MacOS here, there is feedback that it works for M1 MacOS also:
https://www.openproject.org/docs/development/development-environment-docker/
PS, please could you reference the README file you mentioned with a link? we have 1000s of README files :)
Thanks, I'll try the docker setup.
Still, do you have any recommendations about IDE(s) to use?
The main README here: https://github.com/opf/openproject should link the forum at contact us. As you probably noticed from the mail: took me one month to notice that it won't work via e-mail :D
Also: do you have any further material / papers how to write tests?
Hi Rincewind,
we recommend you use VS Code or if you have an IntelliJ license / student license, many developers are also using RubyMine / Webstorm.
There is not one guide to help you get up to speed with RSpec and OpenProject. However, a basic tutorial on rspec might provide enough insights in its syntax to be able to start reading and writing tests. https://www.rubyguides.com/2018/07/rspec-tutorial/
Best
Oliver
So, I gave the docker contribution setup a shot and it fails during
bin/compose setup
. Docker is installed and running on my Apple Silicon Mac using Docker Desktop (and of coursebrew install docker docker-compose
.What are the exact reasons you prefer macOS and not Windows? And am thinking about the transition now, and I want to make a list of pros and cons to help myself make a final decision. Because if I decide to switch, then it’s forever or for at least ten years because I don’t have enough time and resources to jump from one OS to another often. I have done some reading on ข่าว IT, and it made me think that MacOS would be more beneficial for my work. However, I cannot be sure about that 100%. That’s why I am doing my research on the topic before deciding anything.
I need a system that is robust and doesn't let me down. Really depends on what you want to do, but for me, I wouldn't ever go to Windows again. I got it all -- Macs, iPads, iPhone, AirPods they way it just seamlessly integrates is worth having to go through some trouble (looking at your cons list ;). I can also recommend it as a development environment. The new M1 Macs are blazing fast and compile stuff in times you can't imagine. My M1 Max MacBook ripped my colleagues MacPro Tower in half.
But, you have to be comfortable with the fact, that not all software runs on Mac, especially games...