-
Notifications
You must be signed in to change notification settings - Fork 15
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
Refactor host files into crates #54
Conversation
f10a1eb
to
f276fd1
Compare
8420a46
to
4a4ef69
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! We may want to wait on merging for @Anton-4 to finish the roc-lang/roc#6873 investigation that is blocking the sister PR for basic-cli here: roc-lang/basic-cli#194
|
.github/workflows/ci.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do formatting changes in a separate PR in the future.
fn inc(&mut self) { | ||
unimplemented!(); | ||
} | ||
fn dec(&mut self) { | ||
unimplemented!(); | ||
} | ||
fn is_refcounted() -> bool { | ||
true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems problematic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only matters if a list containing said type is passed between host and roc.
So if there are no effects of the sort List (Result Stream StremErr)
, doesn't matter.
Same witht he other case pointed out.
impl roc_std::RocRefcounted for ReadResult { | ||
fn inc(&mut self) { | ||
unimplemented!(); | ||
} | ||
fn dec(&mut self) { | ||
unimplemented!(); | ||
} | ||
fn is_refcounted() -> bool { | ||
true | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was also generated by RustGlue.roc
. I think we could remove it if we wanted to, because it's not used or needed. I think the implementation is just to satisfy the trait requirement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'll try to remove them all
Looks like some of these are used... |
Oh, I know whats happening. They type is being used in a RocResult. Which does use the refcounting impl. But still, the actual impl won't be called unless eventually the type is used in a list. |
So they are unused, but referenced by RocResult. So they can't be deleted. |
This reverts commit 3e35d57.
@@ -0,0 +1,18 @@ | |||
TODO other crates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just want to have this handled before we merge. I can probably get to it tomorrow but anyone is welcome to take it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can probably get to it tomorrow
I got deep down a segfault rabbit hole when updating the examples to basic-cli 0.13 :p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lukewilliamboswell Can you explain what the purpose is of the roc_app
and roc_fn
crates and why we don't need those in basic-cli?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much @lukewilliamboswell!
This PR separates the rust host files from the roc platform files, and adds a
build.roc
script.The purpose of this change is to simplify the build process, and to have a clearer separation between these elements as this repository serves as an example of roc platforms.