-
Notifications
You must be signed in to change notification settings - Fork 0
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
CLI issue #101
Comments
The issue (I think) is centered around the Windows folder separation character being the same as the escape character. The file list is read by the CLI correctly and passed to the python launcher correctly, and then passed back to the core Rust code incorrectly (note "\" changed to "\\", except for "\t" in "\toggle"; "\t" is getting turned into a tab character):
I can get further along in the generate process by manually replacing "\" with "/". |
A simple fix would be to change the folder separator characters to the unix style "/" from the CLI before calling Python. Would a global replace of all "\" into "/" for files introduce problems? |
There is no pattern dispatcher, so you need to give it the path. The screwiness though is due to the roundabout trip from Python, to Rust, then back to Python again. The "" get escaped on the first Python to Rust boundary, Rust then treats it all as raw string, then when it tries to send it back to Python, Python doesn't know what to do with a string with bunch of escape characters that aren't escaping anything. Give it a Linux-style path and it'll work. Keep in mind, this is still in development. I know the problem, but its only an issue for Windows and I was the only one working on Windows up til now. Its works as expected in Linux. I've got this as a to-do item for me when I start on a pattern dispatcher, but I wanted to see if we'd get plugins going before I did a pattern dispatcher. And I've been spending much of my "O2 time" on the docs recently. I think we really just need to overhaul how paths are handled. I started that with the pypath macro to translate a I don't think a straight find and replace is the best way to go. Instead, I think we just want to always handle paths as a I started #102 for general pattern generation stuff, so if you'd like to fix up the paths, just make a note of it there. I've obviously not been too concerned with the Windows path issues so far... lol. |
Ok. I'm perfectly fine using linux style paths. |
The bug can also be fixed by prepending the file string with r to force the python interpreter to treat the file strings as literals instead of trying to process escape characters. See #100 |
fixed in #100 |
Now that I can reliably launch origen inside the example app, I tried the generate command. I'm not sure if it's user error or another bug similar to #27. I tried 3 different ways.
The text was updated successfully, but these errors were encountered: