Skip to content
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

[Doc] Add how to set environment variables for fish users #1800

Merged
merged 3 commits into from
Aug 29, 2020

Conversation

chengluyu
Copy link
Contributor

🙋‍♂️ Hi, I'm a fish user and encountered a small problem when I was adding environment variables. So I added this part to the documentation. Hope it helps other fish users.

Copy link
Collaborator

@archibate archibate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMig!
Plus 1 concern: will we add a explaination for each kind of shell including csh, pwsh, pysh? My opinion is fish users should know how to set environment variables (set -x). If it's not used by majority, we'd better use some generic advices, e.g.: set TAICHI_REPO_DIR to the path to Taichi repo, no matter bash, zsh, fish, or even windows.

set -x PYTHONPATH $TAICHI_REPO_DIR/python $PYTHONPATH
set -x PATH $TAICHI_REPO_DIR/bin $PATH
# set -x CXX /path/to/clang # Uncomment if you encounter issue about compiler in the next step.
# set -x PATH /opt/llvm/bin $PATH # Uncomment if your llvm or clang is at somewhere else.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# set -x PATH /opt/llvm/bin $PATH # Uncomment if your llvm or clang is at somewhere else.
# set -x PATH /opt/llvm/bin:$PATH # Uncomment if your llvm or clang is at somewhere else.

Not super sure about fish, is this intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! This is intentional. See fish-shell/fish-shell#527 (comment) for an example.

@codecov
Copy link

codecov bot commented Aug 28, 2020

Codecov Report

Merging #1800 into master will increase coverage by 0.98%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1800      +/-   ##
==========================================
+ Coverage   42.45%   43.43%   +0.98%     
==========================================
  Files          44       44              
  Lines        6202     6011     -191     
  Branches     1073     1075       +2     
==========================================
- Hits         2633     2611      -22     
+ Misses       3414     3246     -168     
+ Partials      155      154       -1     
Impacted Files Coverage Δ
python/taichi/lang/ast_checker.py 70.58% <0.00%> (-1.64%) ⬇️
python/taichi/testing.py 75.00% <0.00%> (-0.76%) ⬇️
python/taichi/lang/linalg.py 89.33% <0.00%> (-0.67%) ⬇️
python/taichi/lang/meta.py 62.31% <0.00%> (-0.54%) ⬇️
python/taichi/lang/__init__.py 41.94% <0.00%> (-0.51%) ⬇️
python/taichi/misc/util.py 17.75% <0.00%> (-0.28%) ⬇️
python/taichi/misc/gui.py 0.00% <0.00%> (ø)
python/taichi/misc/task.py 0.00% <0.00%> (ø)
python/taichi/lang/shell.py 0.00% <0.00%> (ø)
python/taichi/tools/patterns.py 0.00% <0.00%> (ø)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update da41c85...7012d87. Read the comment docs.

@chengluyu
Copy link
Contributor Author

LGTMig!
Plus 1 concern: will we add a explaination for each kind of shell including csh, pwsh, pysh? My opinion is fish users should know how to set environment variables (set -x). If it's not used by majority, we'd better use some generic advices, e.g.: set TAICHI_REPO_DIR to the path to Taichi repo, no matter bash, zsh, fish, or even windows.

Your concern is right. I've read some documentations (e.g. nvm), which include variations of different shells for users’ convenience. But this practice will make our documentation long-winded. So I shorten the description, including the possible pitfall only.

docs/dev_install.rst Outdated Show resolved Hide resolved
Co-authored-by: 彭于斌 <1931127624@qq.com>
Copy link
Collaborator

@archibate archibate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now.

@archibate archibate merged commit d8a2b96 into taichi-dev:master Aug 29, 2020
@yuanming-hu yuanming-hu mentioned this pull request Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants