-
Notifications
You must be signed in to change notification settings - Fork 29
update dev install instructions #8808
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
Conversation
📝 WalkthroughWalkthroughThe development installation documentation was updated by removing the entire Docker section and associated instructions. MacOS installation steps were revised to eliminate architecture-specific commands and to simplify environment variable exports, standardizing them to use the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~6 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
LGTM, leaving approval to @normanrz
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
DEV_INSTALL.md
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: MichaelBuessemeyer
PR: scalableminds/webknossos#8221
File: CHANGELOG.unreleased.md:14-14
Timestamp: 2024-11-25T14:52:23.201Z
Learning: For the `webknossos` project, changelog entries in `CHANGELOG.unreleased.md` should be concise and avoid unnecessary detailed explanations.
# Set env variables for openjdk and openssl | ||
# You probably want to add these lines manually to avoid conflicts in your zshrc | ||
echo 'if [ $(arch) = "i386" ]; then' >> ~/.zshrc | ||
echo ' export JAVA_HOME=/opt/homebrew/opt/openjdk/libexec/openjdk.jdk/Contents/Home' >> ~/.zshrc | ||
echo ' export PATH="/usr/local/opt/openjdk/bin:$PATH"' >> ~/.zshrc | ||
echo ' export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.zshrc | ||
echo ' export LDFLAGS="-L/usr/local/opt/openssl/lib"' >> ~/.zshrc | ||
echo ' export CPPFLAGS="-I/usr/local/opt/openssl/include"' >> ~/.zshrc | ||
echo 'fi' >> ~/.zshrc | ||
echo 'export JAVA_HOME=/opt/homebrew/opt/openjdk/libexec/openjdk.jdk/Contents/Home' >> ~/.zshrc | ||
echo 'export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"' >> ~/.zshrc | ||
echo 'export PATH="/opt/homebrew/opt/openssl/bin:$PATH"' >> ~/.zshrc | ||
echo 'export LDFLAGS="-L/opt/homebrew/opt/openssl/lib"' >> ~/.zshrc | ||
echo 'export CPPFLAGS="-I/opt/homebrew/opt/openssl/include"' >> ~/.zshrc | ||
|
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.
Unconditional /opt/homebrew
paths break Intel macOS setups and contradict the Rosetta note below
The new exports hard-code Apple-Silicon-specific paths, so users on Intel Macs (where Homebrew lives under /usr/local/opt
) will end up with an invalid JAVA_HOME
, PATH
, LDFLAGS
, and CPPFLAGS
.
At the same time, the paragraph at lines 56-57 still tells arm64 users to fall back to an x86_64 shell via Rosetta, implying that Intel is still a supported dev platform. The two parts are therefore inconsistent.
Diff proposal that keeps both architectures working and removes the now-misleading Rosetta paragraph:
-echo 'export JAVA_HOME=/opt/homebrew/opt/openjdk/libexec/openjdk.jdk/Contents/Home' >> ~/.zshrc
-echo 'export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"' >> ~/.zshrc
-echo 'export PATH="/opt/homebrew/opt/openssl/bin:$PATH"' >> ~/.zshrc
-echo 'export LDFLAGS="-L/opt/homebrew/opt/openssl/lib"' >> ~/.zshrc
-echo 'export CPPFLAGS="-I/opt/homebrew/opt/openssl/include"' >> ~/.zshrc
+# Detect Homebrew prefix automatically
+BREW_PREFIX="$(brew --prefix)"
+
+# Java & OpenSSL environment
+echo "export JAVA_HOME=${BREW_PREFIX}/opt/openjdk/libexec/openjdk.jdk/Contents/Home" >> ~/.zshrc
+echo "export PATH=\"${BREW_PREFIX}/opt/openjdk/bin:\$PATH\"" >> ~/.zshrc
+echo "export PATH=\"${BREW_PREFIX}/opt/openssl/bin:\$PATH\"" >> ~/.zshrc
+echo "export LDFLAGS=\"-L${BREW_PREFIX}/opt/openssl/lib\"" >> ~/.zshrc
+echo "export CPPFLAGS=\"-I${BREW_PREFIX}/opt/openssl/include\"" >> ~/.zshrc
@@
-Note: On arm64-based Macs (e.g. M1), you need to run WEBKNOSSOS in an x86_64 environment (Rosetta 2). In case you accidentally started WEBKNOSSOS in an arm64 environment, it is advisable to delete several caches `~/.m2`, `~/ivy2`, `~/.sbt`, `~/.yarn-cache` and run `./clean`. Since Postgres and Redis are isolated processes, they can be run either from arm64 or x86_64 environments.
+# Apple Silicon and Intel are both supported. The automatic `brew --prefix` detection
+# above sets the correct paths for either architecture, so a Rosetta shell is no
+# longer required.
This keeps the doc functional for both chip families and removes obsolete guidance.
Please adjust wording as needed.
Also applies to: 56-57
🤖 Prompt for AI Agents
In DEV_INSTALL.md around lines 30 to 37, the environment variable exports use
hard-coded Apple Silicon paths under /opt/homebrew, which break Intel macOS
setups where Homebrew is installed under /usr/local/opt. To fix this, update the
instructions to conditionally set paths based on the architecture or provide
separate instructions for Intel and Apple Silicon Macs, ensuring both
architectures are supported. Also, remove or update the Rosetta fallback
paragraph around lines 56-57 to avoid confusion and keep the documentation
consistent.
This PR updates the install instructions.
There is no ./start-docker.sh anymore and webknossos now works with apple silicon.