-
Notifications
You must be signed in to change notification settings - Fork 47
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
Tab characters cause grit import to panic #1
Comments
Think I've found a fix to this. In if origin.ID == 0 || dest.ID == 0 {
panic("link endpoints must have IDs")
} Changing 0 to -1 fixes the problem and Not sure if this will cause problems elsewhere? |
You're on the right track, but I suspect there's a lot more wrong going on there -- the truth is I forgot about the command, during the switch from DAGs to multitrees, if I'm not mistaken. The import code doesn't have any tests either! I'll fix it for the next release and add the tests, probably tomorrow -- I had it working before so it shouldn't take long. BTW, it doesn't work for spaces either, it's just including them in task names 😄. I will definitely have to add support for spaces too. |
Yeah I realised the spaces thing when I was looking at it today, I just managed to confuse myself! I have imports working, I think as intended minus the spaces thing. I can submit a pull request if you want, although I haven't written tests. |
4f226b0 probably would cause other problems, and in 3c266a8 the function shouldn't accept zero, since it's used for user-provided selectors elsewhere -- I shouldn't have used the function there to begin with, and it's fixed now. 6e518bd was spot on, thanks for pointing that out! I ended up reworking the whole thing, it was too confusing. The were also some other issues, like not updating ancestors after insertion. Props for trying to make sense of that mess! 😄 |
Yeah I kind of expected those would break something else, glad to help though. Really cool project btw 😄 |
grit import
panics if the imported file has tab delimiters. It works if tabs are converted to spaces.I've attached the error that got thrown, as well as the two files that I used to test it.
import-with-spaces.txt (this works)
import-with-tabs.txt (this errors)
import-with-tabs.log
The files were made in nano with tabwidth of 4.
The text was updated successfully, but these errors were encountered: