You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was just getting incredibly confused why lalrpop::Configuration().set_out_dir("out").process_current_dir() wrote the .rs file to the current directory instead of the out/ directory. I looked through the documentation and couldn't find any answer, I looked through the api/mod.rs source code and couldn't find any answer. Only when digging deeper into the source code I found the following:
And process_current_dir apparently sets the in_dir to ./src triggering this "compatibility" behavior.
This is so incredibly unintuitive that I think that behavior should either be removed or the Configuration API be deprecated in favor of something more sane.
The text was updated successfully, but these errors were encountered:
I don't remember much of the details here but I definitely think we should clean this up for 1.0. I was trying it out on a recent project and I also hit some issues with a .lalrpop file that was not in the root directory, I think the problem was more that I didn't know what to specify as the path in the lalrpop_mod macro, though.
I was just getting incredibly confused why
lalrpop::Configuration().set_out_dir("out").process_current_dir()
wrote the.rs
file to the current directory instead of theout/
directory. I looked through the documentation and couldn't find any answer, I looked through theapi/mod.rs
source code and couldn't find any answer. Only when digging deeper into the source code I found the following:lalrpop/lalrpop/src/build/mod.rs
Lines 91 to 96 in b777a6a
And
process_current_dir
apparently sets the in_dir to./src
triggering this "compatibility" behavior.This is so incredibly unintuitive that I think that behavior should either be removed or the
Configuration
API be deprecated in favor of something more sane.The text was updated successfully, but these errors were encountered: