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

Executing expand.py from outer dir #98

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

haruyama480
Copy link

expand.py could fail when execution from outer directory.

% python3 ${HOME}/src/github.com/rust-lang-ja/ac-library-rs/expand.py segtree
Traceback (most recent call last):
  File "xxxxxxx/src/github.com/rust-lang-ja/ac-library-rs/expand.py", line 99, in <module>
    buf = output_file(i)
  File "xxxxxxx/src/github.com/rust-lang-ja/ac-library-rs/expand.py", line 53, in output_file
    with open(src_path+filename+'.rs', 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'src/internal_bit.rs'

It can be solved with reference of argv[0]

@@ -43,14 +44,14 @@
'scc': ('internal_scc',),
'segtree': ('internal_bit', 'internal_type_traits',),
'twosat': ('internal_scc',), }
src_path = 'src/'
src_path = pathlib.Path(sys.argv[0]).parent.joinpath('src')
Copy link
Author

Choose a reason for hiding this comment

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

execution from . also success

% python3 ${HOME}/src/github.com/rust-lang-ja/ac-library-rs/expand.py segtree | pbcopy
%

@haruyama480 haruyama480 changed the title executing expand.py from outer dir Executing expand.py from outer dir Apr 24, 2022
@TonalidadeHidrica
Copy link
Collaborator

Expanders do not affect language update; triaged as low priority.

Copy link
Collaborator

@TonalidadeHidrica TonalidadeHidrica left a comment

Choose a reason for hiding this comment

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

Fix the conflicts.

@haruyama480
Copy link
Author

I'm sorry for late response.
I fixed conflicts!

@TonalidadeHidrica
Copy link
Collaborator

@haruyama480 Thanks for fixing, I'm reviewing when I have a time. By the way did you pushed the last commit 2d270b8 by mistake?

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