Comments (5)
Think I've found a fix to this.
In multitree/node.go
, line 313:
if origin.ID == 0 || dest.ID == 0 {
panic("link endpoints must have IDs")
}
Changing 0 to -1 fixes the problem and multitree_test.go
still passes. Initialising NewNode
with an ID with 1 on line 24 seems to fix things too.
Not sure if this will cause problems elsewhere?
from grit.
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.
from grit.
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.
from grit.
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! 😄
from grit.
Yeah I kind of expected those would break something else, glad to help though.
Really cool project btw 😄
from grit.
Related Issues (20)
- Task "Submodules"
- Brew formula HOT 2
- diamonds are not allowed HOT 3
- Question: Bullet Journaling Usecase HOT 3
- Dockerfile HOT 3
- The name `grit`.
- Packaged for Arch Linux in the AUR HOT 1
- $XDG_CONFIG_HOME is ignored on macOS
- import -p=<n> doesn't work HOT 2
- Windows builds HOT 1
- Build fails on Windows Subsystem for Linux HOT 1
- nil pointer error when link to non-existent task HOT 1
- Task order
- I love it HOT 1
- Backup and cloud sync HOT 1
- List all nodes
- [PANIC] When trying to link node from non-date root to date node 0
- tree --progress: Feature to save space from children of checked nodes
- all commands panic on mac
- [Feature Request] Export trees to indented lines
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grit.