What is the current plan for some of the incoming breaking changes:
I assume there is more with everything in flux, but I am not sure what all there is.
I personally would like to avoid blocking these changes as much as possible and enable developers to just work on new changes.
I think it would be reasonable to anchor the current roc on main (probably the version before backpassing removal?) and make a new release of all the platforms. After the releases, we could let roc fall stale for larger chunk of time to let in these many breaking changes. Rip the band-aids off. Delete old syntax, etc. Attempt to keep the latest main of core platforms updated with the latest main of roc, but don't do another release until there is some stabilization.
Task can be removed at any time once basic-(webserver|cli|ssg)
make proper releases out of their prereleases. I wouldn't worry about this one too much. The only question is how much grace period do we give to users
Renaming builtins and removing space calling convention don't concern anything backend-related really, so we should be able to just let Roc stale for a day or two and coordinate those platform releases without being too worried that we'll hit a big snag
The refcounting changes and C-ABI changes are what I'm expecting we'll need to take our time with, since Murphy's law means we'll probably hit some stupid bug
While trying to migrate the platforms
current refcounting change is super basic and should be super easy to migrate. Just requires changing a single constant
Anything with atomic refcount in the future is adding a feature, so no breaking change
So maybe all of these bandaids could actually be ripped off and fixed in a few days.
Okay, then yeah, throw that in with space-calling and renaming
eventual c-abi changes when I simplify llvm generation
This on the other hand I expect will hit many bugs
I'm free all day Sunday to help with these
We could probably prepare basic-(cli|webserver)
PRs in advance for those three changes
Yeah, if we want, I think we could rip off all of these bandaids pretty easily before the next release.
I think that this still needs some bigger updates (like we haven't updated all the tests in the repo yet):
This is not ready yet and will likely be more buggy and slow of a change so can be worried about in the future.
Sounds right to me
I guess we should delay remove task until after the next release of all platforms. Just in case anyone finds bugs with PI.
That's a good plan
So I guess I think we should do the first 3 and cut a new release of all the platforms for PI and these changes.
is basic_ssg updated to PI?
Yep, at the pre-release stage
We never finished the hyper upgrade, that's blocking badic-ssg full release.
Builtins to snake case or builtins to PNC? What are referring to here?
I had a plan to upgrade those in a non breaking way. The reason wasnt the platforms, I was more concerned about all the packages downstream.
But if we're talkign PNC that may be an issue anyway if its not backwards compatible
I presume builtins to snake_case
bullet point 1 is snake_case, bullet point 3 is PNC
We've removed all basic-cli from the roc repo now.. so we can move forwards with breaking changes without a release of basic-cli to pass CI.
good to know
I'm thinking we fixup any issues preventing us promoting the platforms to full release, and then do as you suggest and make lots of changes for a couple of weeks, keeping basic-cli and basic-webserver mostly in sync.
We can cut TESTING releases of roc instead of nightlies during this time so the platforms can pass CI.
^^ just my ideas based on the current CI pipelines, @Anton might have iseas
Sure. can first get the new PI releases out then look at these other breaking changes after.
Just means another breaking release in a few days to weeks (due to snake_case and refcounting change)
I'm thinking we fixup any issues preventing us promoting the platforms to full release
What still needs to happen is:
Let's come back to this discussion after that's done.
If you want to try out breaking changes with basic-cli/basic-ws I recommend making a branch on the roc repo and a PR on basic-cli/basic-ws and test it with nix like this
This examples PR's feedback needs to be addressed
Going to do this now
Anton said:
I'm thinking we fixup any issues preventing us promoting the platforms to full release
What still needs to happen is:
- an upgrade guide that explains purity inference and how to upgrade your code.
- This examples PR's feedback needs to be addressed
- Set up roc agent so it can upgrade roc projects to basic-cli 0.18 . This should be a lot faster than manually updating all the exercism solutions.
Let's come back to this discussion after that's done.
I don't think we should block release and breaking changes on any of those.
Task will still be around after the release. Guides and updated examples can come after the release. I think we should get the PI releases out for platforms that are ready.
By adding too much into scope, we are blocking the roc repo from progressing.
Basic CLI and basic webserver are both ready to cut a release. I think we should just release them.
Then I think we should split the roc release into a separate testing and latest such that we can start rolling in the breaking changes.
I will not that we should block specifically removing task on:
But I don't think other breaking changes should be stuck due to that
The examples PR is done. I'll be done with all the rest by tomorrow evening. I think we can agree that a one day delay does not warrant a thorough discussion?
Oh, :scream:
This is way faster than I realized
Carry on.
Luke Boswell said:
We never finished the hyper upgrade, that's blocking badic-ssg full release.
I forget where this was left off. Any summary. Anything you specifically need help with?
Also, is it just a musl build problem or a general problem?
I propose we slap a big warning message at the top of the tutorial that foundational syntax is in flux, with large-scale tutorial updates coming soon.
Maybe atop the repo's README, too
That's a good idea
Optionally redirect people here for questions
Random thought: we could make the snake_case no longer a breaking change by inserting a pass that normalizes all lowercase identifiers to snake_case prior to canonicalization. (temporarily, I mean)
Then it won't really matter if the built-ins and all of the other roc code out there migrates all at the same time.
Gonna try this right now
We support both styles right now, so we don't to migrate everything all at once, but if it is easy to do this normalization go ahead.
After upgrading things to purity inference I have to say I really like it. Being able to get rid of the new concept of Task
makes a big difference for Roc. I like our drive for simplicity :heart:
I have done the work to upgrade all builtins to snake_case
using PNC in this PR: https://github.com/roc-lang/roc/pull/7463. I also added auto snake_case-conversion in the manner Joshua Warner suggested for an easier transition.
It's in draft because I'm getting an infinite hang right now. This happens even with the auto case-conversion removed, so I presumably failed to update something in the compiler when renaming everything
If anyone has any advice on how to debug hangs in roc_load
build.rs, I'd love to hear it. It's tricky to debug since build.rs files don't show stdout until they finish (e.g. crash), meaning standard print debugging is very arduous
I'll probably go to bed soon, but I'll try to have this ready by the end of the weekend
Perhaps cargo build -v
or -vv
or -vvv
can help?
but I'll try to have this ready by the end of the weekend
No worries
Checking if it happens with a single thread may also be useful: cargo build -j 1
. I recommend doing cargo build
(multithreaded) first and then cargo build -j 1
so you don't have to wait super long
Lol, I thought that -vvv
wouldn't help, but it totally did
[roc_load 0.0.1] cargo:rerun-if-changed=../builtins/roc/Bool.roc
[roc_load 0.0.1] cargo:rerun-if-changed=../builtins/roc/Dict.roc
[roc_load 0.0.1] thread '<unnamed>' panicked at crates/compiler/can/src/abilities.rs:501:9:
[roc_load 0.0.1] Replacing existing declared impl: (ImplKey { opaque: `Inspect.IdentId(34)`, ability_member: `Inspect.i16` }, Some(Impl(`Inspect.IdentId(53)`)))
Okay, the main issue is fixed, but there's a remaining problem: if we convert every ident to snake case, then FFI breaks when roc_fx_stdoutLine
gets converted to roc_fx_stdout_line
. I can't find a way to avoid doing that without making the case conversion logic a good deal more complicated, since the names of effects are normal camelCase
. If we start discriminating on which ident is where in the code, we'll pollute the can
code with temporary code. Updating all the necessary FFI-relevant code in the Roc repo is 147 files already.
So I'm leaning towards us not doing the case conversion and us trying to find the right time to do the conversion instead
Okay, I'm off to bed, everything's in the PR: https://github.com/roc-lang/roc/pull/7463
Sam Mohr said:
Okay, the main issue is fixed, but there's a remaining problem: if we convert every ident to snake case, then FFI breaks when
roc_fx_stdoutLine
gets converted toroc_fx_stdout_line
.
I really think we should stop worrying and just rip the band-aid off
Get rid of the old naming convention and start moving everything over
It can be done after the PI release, like removing task, but my refcount change also requires updates to all platforms and is a breaking change.
All that needs doing in theory for this PR is to remove the snake case conversion and update tests. Then we can get PRs ready with snake case builtins for the platforms and let it all rip
We could release without the platforms, but it'd be better for users to have working platforms continuously
but it'd be better for users to have working platforms continuously
Yes, we want to avoid having broken tests on platforms for many days. The longer that lasts, the harder it can be to investigate and revert something that we can't fix.
Today, we have a working version of each core platform with PI. Why don't we cut releases and switch roc over to having a separate lastest and testing build. Then we can start getting these breaking changes in.
I don't think this is a blocking change for the release: https://github.com/roc-lang/basic-cli/pull/292
basic-cli and basic-ws will be released today
Then we can start getting these breaking changes in.
For me the important thing is that we don't; get in multiple breaking changes in a short time, hit complex issues, and it's a pain to revert things.
Anton said:
basic-cli and basic-ws will be released today
Are they going to be released with just PI, or with migrations for snake_case and PNC?
upgrading basic-cli and basic-ws with a specific branch for each breaking change looks like it has great trade-offs
PI and snake_case
For me the important thing is that we don't; get in multiple breaking changes in a short time
For me, I am much more concerned about:
camelCase
to snake_case
). It isn't guaranteed to always be correct and we have roc format --migrate
for that already.snake_case
but builtins still in camelCase
).As long as there are no releases yet, reverts should not be that big of a deal.
Also, grouping breaking changes avoids needing tons of releases (which is inconvenient for us and for users).
We should have enough tests in the main roc repo to defend against most concerns of getting multiple breaking changes in back to back. If not, we need to keep working to expand test coverage. I think that "hit complex issues, and it's a pain to revert things" is a symptom and not a reason to slow down.
Anyway /rant over. Sorry if this is overly strong or frustrated. @Anton, I totally trust whatever release processes you pick (and that you'll help shape the release process well going forward). You deal with so much stuff managing releases and I am ultra grateful :heart:. Please don't take any of my comments above as personal. They aren't. Just a collections of frustrations that are apparently getting to me.
All good, very understandable concerns, it's hard to put a cost on all our concerns and compare them. I'd like to talk about this more later, I really want to get those releases in today.
Makes total sense.
Also, has anyone looked at updating the platforms in the roc repo to PI (benchmarks, cli tests). I plan to start doing it, just wasn't sure if someone is already done/half way done, but it isn't merged yet.
status update: exercism is on basic-cli 0.18 and snake_case https://github.com/exercism/roc/pull/171
It was an enormous pain with the templates and the dynamic programming languages involved but it's done :tada:
Wow great work! That does sound like a huge pain
I'd like to talk about this more later
It's always easier to talk specifics. Let's get a list together of all the breaking changes that are ready to merge with a description of their priority; sensitivity to accumulating merge conflicts, if it fixes a common bug, expected work to basic-cli and basic-ws..
I'll start:
renaming builtins
+ sensitive to merge conflicts: Yes
+ expected changes to basic-cli/basic-ws: Multiple, but easy overall
+general priority: medium. Would be really nice to fully switch over to snake_case
removing space calling convention
+ sensitive to merge conflicts: Yes
+ expected changes to basic-cli/basic-ws: Multiple, but easy overall
+ general priority: medium. Same as above (less important for consistency than the naming)
I think it's time we move forward with our new release management process.
I propose we cut a "nightly", give it a release version 0.0.1+123abc
as we've discussed. @Anton
Then from this point we switch to roc compiler being free to move ahead of the platforms; we cut a new "testing" release periodically and promote it to the "supported" version when we get the platforms ready.
(deleted)
I think we need to create org-wide milestones for each of the major breaking changes (grouped together as it makes sense)
This is a new idea, and I'm not familiar with this workflow. Are you able to expand on that a little? Have you seen the previous discussion on release management, what are your thoughts on that?
create org-wide milestones
Similar to the 0.1.0
in GH?
One of the main goals we had is to really minimise the management and coordination overhead. We wanted a workflow that could give a "stable" experience if people use the latest supported/compatible version. But also accept that this version will change regularly and older code will certainly break between versions.
Yeah similar
The big thing is that the current stable of any org-owned platform works OOTB with the current stable of the compiler
And then we do our best to keep the nightlies in sync
But it's understood that the platforms may lag compiler on nightly
It's a lot of (handraulic) work making a nightly release. I really want to move away from that and free up Anton's time a little.
Ideally we can get most things automated... but there's a lot of CI wrangling
It would be _doubly_ nice if we could test stable and nightly of each platform against both stable and nightly of the compiler and have a little thing on the Repo that shows the status / last SHA it was built successfully with
Yeah the idea was a daily CI run that grabbed the latest versions of everything and tested them all and reported compatibility.
So we know when we have all the supported platforms/packages :check: and that's the signal for promoting a nightly/testing release to the latest/supported version.
Yeah, the same for "well-known" packages would be great. Especially if we could write up a GH action for it and ask the package authors to run it via GH using their own minutes
So we always have a "supported" / latest release in roc that is known to work well with the "supported" / latest versions of the platforms and packages.
We periodically (weekly?) cut a new "testing" release of roc that will likely be ahead of the platforms and packages.
We test daily the "supported" & "testing" releases against the latest versions of everything in the wild, and when everything is :check: against the testing release it get's promoted.
That sounds great.
And we shouldn't go crazy worrying about a new stable/support version being cut on any sort of cadence
It'll get cut when we feel good about it
I'm going to update my release proposal again to hopefully clarify some of the key terms and workflow.
Yeah, I would love to get something like this rolling. Then breaking changes are just incrementing a version number.
And the compatibility check will enable us to increment the version number if it is accidentally missed
And platforms at any point can be updated to a new breaking change number. No specific rush.
Will make it much easier to build an app by grabbing versions of each package and platform for a specific roc breaking change version. Then get stability.
I mostly care about keeping main in the roc repo working and even a basic form of breaking change versioning unlocks that.
If we want less overhead, the alternative would be to just have a dev and main branch and periodically move dev over to main, but that still leads to the stop the world updates when dev is promoted to made. A rolling version number with history is much more decoupled.
@Luke Boswell and/or @Anton let me know if there are any specific pieces that would really help get this in. I'm keen to help.
New release management proposal
It's a lot of (handraulic) work making a nightly release
I think I spend about 10 minutes on it per day if there are no test failures. I would estimate there is a test failure in 1 out 10 days.
I think it's time we move forward with our new release management process
With everything we have going I think we should hold this off a little while longer, things are set up to test with TESTING but not with this new release approach. It doesn't seem like it would require a lot of changes but it feels risky based on my intuition.
Based on Brendan's list I feel good about shifting to a TESTING release once a breaking PR is merged in Roc main.
We should have enough tests in the main roc repo to defend against most concerns of getting multiple breaking changes in back to back. If not, we need to keep working to expand test coverage. I think that "hit complex issues, and it's a pain to revert things" is a symptom and not a reason to slow down.
I think this is a good diagnosis, I've given this some thought and will propose testing changes in ideas in the near future.
I feel good about shifting to a TESTING release once a breaking PR is merged in Roc main.
We could start with "builtins to snake_case" PR#7463 ?
I'm concerned that we currently have at least a few [DO NOT MERGE] breaking changes stacked up, and I worry that we are going to lose all this momentum. It's going to be challenging to keep all of these PR's fresh for more than a few days. Not to mention the work that we want to start but would potentially cause merge conflicts.
While contributors are active and working on new features it would be good to unlock this effort. I appreciate the intent to not break main, the nightlies, etc.
Maybe there is another way. Could we make a dev
or breaking
branch maybe and start merging these PRs in there? This way we know they are at least compatible with each other.
That's a great idea, breaking is the right word
The issue with my proposal here, is that it doesn't help us if we want to slow down and just test one breaking change with a release cycle at a time.
Would that just make rebasing on main more brittle? Cause some of these changes are pretty low chance of conflicts
Luke Boswell said:
The issue with my proposal here, is that it doesn't help us if we want to slow down and just test one breaking change with a release cycle at a time.
I really don't think we need to do this. The syntax changes are unlikely to be majorly broken. The refcounting change could be majorly broken but is trivial to revert. The utf-8 change is unlikely to be broken.
So I think merging is pretty low risk
Hardest to detangle would PNC + snake_case
I'm not very experience with this level of managing software projects, with a beginner level of git
foo, I'm concerned that we are intentionally slowing PR's down... at a time when we want to move fast and get to the next milestones.
I agree
I think if for now we make a separate testing and latest release (later switching to the new breaking change plan), we can merge everything into main right away.
I think that is the way to go
So what should we do about all these breaking PR's that are sitting here ready to go?
Merge them all directly into main as a testing release is my proposal.
I don't know if that's feasible to expect won't hit lots of merge conflicts or unexpected issues
Merge conflicts are an issue of stale prs. Merging prs sooner and more often fixes that.
Unexpected issues are fine
This is just a testing release
My understanding is, the sooner we merge these the less impact they have on everyone elses PR's... you just make sure you're in sync with or rebasing on main.
As long as the issues that are arise are issues that we plan to forward fix and we think it is unlikely we want to revert the PRs (which I think is the case if we do a testing release), then I think they should all be good to merge.
Maybe I'm just getting confused with something obvious, why aren't we merging these PR's then? They're labelled [DO NOT MERGE]
In my mind the only issue is not having a separate testing and latest release now. We have new releases for the core platforms with PI now. So I think we are good to move forward
I put DO NOT MERGE on mine because it seemed to need platform coordination
I can remove that from the title
Yeah, platforms will update later. So should be good to merge
@Sam Mohr how do you feel about us merging https://github.com/roc-lang/roc/pull/7321 first?
Do it now u wont
I'm not sure if @shua is planning on making a separate PR
You mean for the UTF-16 stuff?
Probably
As a note, if no one else looks into the breaking change GitHub action work, I plan to look at it next. Not sure the best way to experiment with it, probably in another repo. That said, not exactly sure when I will next have time.
I'm not sure what that is Brendan... is there an issue or something for that?
Oh, the release management thing?
Yeah
Release management and testing for the new breaking change versioning
Hoping to automate a lot of it
Luke Boswell said:
I'm not sure if shua is planning on making a separate PR
I was leaning towards a separate PR
Merged conflicts fixed for snek_ces
No step
Sam Mohr said:
Merged conflicts fixed for snek_ces
Gonna land it?
Once Luke and I fix the basic-ssg
dependency that we use to build the Roc site, yes
Also updating Weaver in the meantime
Working on basic-ssg now
Brendan Hansknecht said:
current refcounting change is super basic and should be super easy to migrate. Just requires changing a single constant
Do you think we should tack this one onto the paired builtin / testing PRs in basic-cli etc?
That sounds fine
Should just require updating the version of roc-std after landing the refcounting pr. At most requires also updating any refcounting constants (but I don't think basic-cli directly sets any of those)
Ok, so I imagine we land the builtin snake_case
PR into main, and then follow that with your refcount PR and then that's probably enough scope for a testing release.
We could remove Task, I skimmed through and theres a few tests/snapshots remaining, after we land the tutorial update.
I'd vote for doing that
Why is that? just cause we are close?
Any code affected by this set of breaking changes must be updated by users for it to run again, even if most of that update can be handled by roc format --migrate
We've been waiting for the Task
removal to ensure people have time to migrate, but they're gonna have to migrate as soon as this release drops
I've overloaded the work migrate there:
The next major breaking change would be static dispatch right?
We've been waiting for the Task
removal to ensure people have time to migrate from Task to PI, but they're gonnna have to migrate everything else anyway as soon as this release drops
Probably
Actually no
It'll be more syntax breaks
I believe || func
doesn't work fully with space calls
So we'll need to break \args -> func
to get that in
And then for static dispatch, that's in a big bundle with the other compiler phases being updated
I think I lean towards deprecating Task in this breaking change... and then removing it with the next.
Then PNC/syntax (functions, string interpolation etc...) in the next.
Then static dispatch, remove abilities, deprecate module params, deprecate default records fields etc...
Aka lambda sets, mono, etc.
Okay, we can do that
I'm just spitballing here...
I guess what we could do is add a deprecation warning on all function calls in the Task
module?
I'm not sure who gets helped by keeping Task in Roc, though
I lean towards deprecating Task in this breaking change
Actually... with the snake_case
builtins it makes no sense to keep it. All the packages need to be updated anyway
Yep, all of the things will be broken
How far are we from landing your builtins PR?
The only thing left is to get the website building
It's just the question around basic-cli docs right?
Yep
That's why I suggested we get @Anton 's blessing to do what basic-webserver
does
Yeah, so if we are happy with the static site / GH Pages thing, then we can land that, land the refcount, update the paired basic-cli PR (for refcount), and then remove Task and we're almost there.
Which for the Antons reading this message is to generate the docs in basic-cli
instead of in the Roc compiler repo
I'll do the Task PR once snake_case
is merged
I have all day tomorrow I could work on that also... I might try and remove/update the tests and snapshots in a separate PR first
Sure, works for me
Should just be a case of removing:
Task.roc
moduleIf you'd enjoy working on that, I have plenty of other stuff to do
Also, update https://github.com/roc-lang/roc/blob/main/crates/compiler/can/src/effect_module.rs
It's just find and replace on all files in the compiler right? :sweat_smile:
My entire job is built upon ripgrep
So kinda
Sam Mohr said:
Which for the Antons reading this message is to generate the docs in
basic-cli
instead of in the Roc compiler repo
Sounds good :+1:
Okay, great!
https://github.com/roc-lang/basic-cli/pull/306
I incorporated the docs statically added by Luke in https://github.com/roc-lang/basic-cli/pull/307
But I also added a GH workflow in that PR
I figured the two workflows would conflict, that's why I closed yours
The hasnep/setup-roc@main
action also builds the site but it doesn't load it into the right location for the GH Pages compatible with the new multi-version setup I included
So I don't think these two PR's are compatible
Oh, damn
Let me update it, then
Here's a 2 file one to remove basic-cli
docs from the roc-lang.org
website: https://github.com/roc-lang/roc/pull/7483
Alg, just done it
Thanks!
Was there also basic-cli docs in the CI workflows? or was it just the www/build.sh script that was causing the issue?
Seems like attempting to build basic-cli
's docs in www/build.sh
was the last issue in the workflow: https://github.com/roc-lang/roc/actions/runs/12660030240/job/35280434791
I don't think that basic-cli
docs are in the CI workflows, I'll double check
There are workflows to build basic-cli
for testing purposes, but those are all triggered manually
Okay, in the basic_cli_build_release.yml
action, we build and upload the docs. Good catch!
Let me remove that
@Luke Boswell could you re-approve when you get the chance?
Once this passes CI and testing, we should be able to just merge, then merge in main into the snake_case branch, wait for CI, and merge that
So just clicking buttons
Sam Mohr said:
Okay, in the
basic_cli_build_release.yml
action, we build and upload the docs. Good catch!
Hold on :p
Okay
What is being changed in basic_cli_build_release.yml?
We no longer need the env var ROC_DOCS_URL_ROOT
The generation and upload of docs for basic-cli
We should probably also remove that in your PR
It's a fast follow up from mine earlier today, but I wasn't sure how long we would need it
Also... we can probably remove the whole binary roc_docs_cli
in crates/docs_cli
@Anton -- can you confirm we only used that for basic-cli docs gen?
The generation and upload of docs for basic-cli
Those are uploaded to the github workflow file storage so I can download them and add them to the release assets like docs.tar.gz in basic-cli 0.18.0.
Can you use a link to the basic-cli GH Pages site now?
Luke Boswell said:
Anton -- can you confirm we only used that for basic-cli docs gen?
I think that may brreak Hannes' github workflows
Luke Boswell said:
Anton -- can you confirm we only used that for basic-cli docs gen?
I think I can answer my own question... we use it for the builtin docs
Ok, let's just leave these docs things alone for a little while then.
We don't need to remove that right now
Can you use a link to the basic-cli GH Pages site now?
It's nice that users can easily download the docs with a single tar for offline use
But the have the package from the URL? cant they just generate the docs locally?
I agree with you that it's helpful... just thinking out loud
Like, what if they could go roc docs --open http://...asdfaWEFWF.tar.br
- that loads the modules from the local cache (or downloads if required) and generates the site fresh
Since this discussion is happening and I need to go to bed, I'll do a single step of removing basic-cli
from www/build.sh
and updating the link in www/content/docs.md
, and do that right in the snake_case PR
And then this discussion can go in that PR I made, which I'll mark as draft for now
It's ok... I don't plan on touching the env var or the doc-cli binary right now. For the short term we can have duplicate ways of generating docs to support the different workflows
Your snake_case
PR is ublocked by https://github.com/roc-lang/roc/pull/7483 though I guess
Well it would be nice to get working, and also Anton seems concerned with the other stuff I removed in the docs PR
So to avoid rushing a decision
I fixed up the snake_case PR
cant they just generate the docs locally?
No, the site generation code changes over time and will fail on old basic-cli releases
Sam Mohr said:
Well it would be nice to get working, and also Anton seems concerned with the other stuff I removed in the docs PR
No I think I just confused things here... I don't think @Anton has any concerns with that PR (speaking on his behalf ofc)
Can you link to the specific PR?
https://github.com/roc-lang/roc/pull/7483
I marked it as draft for now
Ohk, maybe we should reset the change to .github/workflows/basic_cli_build_release.yml
Anton said:
cant they just generate the docs locally?
No, the site generation code changes over time and will fail on old basic-cli releases
For basic-webserver
, we do generate the docs in basic-webserver
though. Is that a problem, then?
It was just the www/build.sh
script blocking things, and I was getting overly ambitious with wanting to remove things.
Maybe we should just close that PR and make a new one for the env var stuff if we want to make those changes
For
basic-webserver
, we do generate the docs inbasic-webserver
though. Is that a problem, then?
We currently only make docs for main of basic-webserver
I've already copied the relevant stuff to the snake_case
PR: https://github.com/roc-lang/roc/pull/7463/files#diff-e772080787482bb78eeddd4d3c75a4ecd414c5e06674fde21d4383c1c3927735
Oh, I see what your getting at I think... well I could if my browser would load that PR.
It's probably best to keep it in the smaller PR
Luke Boswell said:
Ohk, maybe we should reset the change to
.github/workflows/basic_cli_build_release.yml
Just this one file needs restoring I think
I don't think we need to wait for a full CI run either
Okay, I'll fix and you can override merge
Done
Thanks!
I'm gonna set snake_case to auto-merge
I can review it tomorrow if no-one else gets to it before me, but I'm heading off now
Looks like a huge amount of mechanical :snake: changes
Yep
@Anthony Bullard said he'd jump on this grenade for me (bless his sweet heart)
But if you also would like a belly full of shrapnel, be my guest
Thank you for your sacrifice @Anthony Bullard
TESTING releases are now available
Migration PR looks good to me @Sam Mohr
Just for clarity, @Anthony Bullard you did a full review of https://github.com/roc-lang/roc/pull/7463 ?
As full as can possibly be done on such a large change
Pretty much
Are you able to give approvals? This thing will merge as soon as someone clicks approve
I thought I didβ¦
Thanks for approving! I'll look at your PR now in return
Sam Mohr said:
Thanks for approving! I'll look at your PR now in return
Note that I just pushed up some changes that I forgot to add, and then rebased
And ... there are problems...
I think changing the precedence of PncApply to Term instead of Apply broke Pizza
Which is a sentence I just typed...
Don't tell the state of New York
Gonna roll that back real quick and make sure
Nope, can you check main/HEAD?
What would you like me to check?
Actually nevermind, checks wouldn't have passed if this was present there
Found the issue, pushing up
Three more hidden match cases due to use of _ ->
This time for Pizza desugaring
Every time I see a camelCase variable in code outside of Roc, I think "gotta change that". I've been poisoned
Luke Boswell said:
I think the only remaining syntax for this, once we land the staged breaking changes are;
|args|
"string ${interpolation}"
How far off from this are we?
I've just upgraded or staged PR's for the following;
My feeling is that we should batch in the above syntax changes as well if we can.
I would assume string interpolation is trivial
I feel like the later static dispatch changes would then be relatively minor and non-breaking from a syntax and package perspective
As in ... we wouldn't be needing to upgrade all the packages with new releases too
Aka, let's just make these last changes and be done with it? I'm down
Well, I'm more getting at, let's not do the testing builds and uploading the pre-releases to GH until we have those changes. These can sit there until then... assuming they're not too far away
Because the above seem like the only major syntax changes that would need a big change the world ecosystem update.
If we pick up the syntax changes in parallel, I think we can do it quickly
I can definitely do string interpolation since as Brendan points out, it should be pretty easy
Not sure how much effort ||
will be
I guess methods are also a big change, but no code looks like that today, so that won't break anything
Iβm about to do ||
Well then
Gotta finish this PR
I'm not wanting to rush us or anything... I'm just smashing through the upgrades for the packages etc while I have the free time now. Wanting to have a bit of a plan so everyone's on the same page.
I just want to confirm, there's no other breaking syntax changes on our horizon?
Let's look at the realworld example
I'll re-watch that now over lunch
The code is in a GH repo: https://github.com/rtfeldman/roc-realworld/tree/main/src
I'm reading it, which I think is much faster
Thereβs also ? ||
I'm looking for things that are out in the wild now (well in a post snake_case builtins and PNC world), that will no longer be valid
These are all missing, but I don't think that's a problem, since I don't think anything will break existing syntax of these things
Custom types will no?
Yeah removing @
Ah
Well, that one we might just have to accept as a second breaking change
Unless we changed syntax now for opaques to be Opaque.{ value }
Which I think isn't a good idea
I'd be against that
Right, so we're thinking removing @
/ custom types would better live with the static dispatch breaking change? sounds good :thumbs_up:
Yes, I think that would be perfect
Syntax Season is almost over guys
Compiler Grunge Season is always so nice after Syntax Season
Perfect for a light sweater
let's not do the testing builds
Should I not upload any new TESTING releases?
I dont think we need them yet
If you want to then it's ok. It might be helpful to test the process is working ok? idk
It might be helpful to test the process is working ok?
No, should be good :+1:
Another breaking change could be the {}
to ()
change. This isn't a syntax issue, but it is a change that will break statements, since we only allow statements that return {}
. We should probably allow ()
in addition. Not sure if we want it long-term, but at least for now while all of our APIs use {}
we should support both
I don't think this needs to happen now during this rush of breaking changes, but maybe should happen soon?
Maybe it could be the first test for the new versioning/release management idea? (I say not having worked on the GitHub actions for releases at all yet and likely being busy this entire weekend)
That's a good idea! It's not breaking syntax, but a lot of std library functions will change signature
I'm glad you remembered that. Yeah the new default and also the sugar.
If it's not a big change to implement it, I'd definitely like to get that in with these ones too.
I'll do it next
My logic is we can do it now cleanly as a breaking change, so we don't need to support both.
Also there are a lot of places with Args.list!({})
or similar that look a little odd right now.
We'd maybe want to pair with the desugaring of (())
to ()
?
I'm free this whole weekend
Yeah, that's what I was thinking. The whole from {}
to ()
and related changes
Well in that case, it's easier to to just move to ()
as the only unit type, unless we want to support both for some reason?
They both compile to the same thing, but it's nice to force consistency
So I'd vote only supporting ()
for statements
@Sam Mohr upgrading the website to the new syntax is gonna be a whole thing. Like the interactive examples etc. Best to leave it until the dust settles and we have working pre-releases on the streets I think.
Great
So a bit of an update for everyone... we've got pretty much all the platforms & packages upgraded or staged and ready. All that remains now from what I can tell is
|args|
for functions{}
-> ()
for default type, plus the sugarThe only package with haven't upgraded yet is roc-lang/unicode
-- it's used by one of the examples.
Or visualized another way...
snek_cse |
PNC | "${str}" |
|args| |
unit() |
|
---|---|---|---|---|---|
:check: | :check: | :check: | basic-cli | ||
:check: | :check: | :check: | basic-webserver | ||
:check: | :check: | :check: | examples | ||
:check: | :check: | roc-html | |||
:check: | :check: | roc-random | |||
:check: | :check: | :check: | roc-parser | ||
:check: | :check: | :check: | roc-json | ||
:check: | :check: | roc-ansi |
I started on empty tuple support, heads up if someone else was planning on doing that
If someone else is already working on it, I'll stop
Should Break()
desugar to Break(())
?
I'm presuming yes
yeah
same as functions
I'll get started on upgrading roc-lang/unicode
JanCVanB said:
I propose we slap a big warning message at the top of the tutorial that foundational syntax is in flux, with large-scale tutorial updates coming soon.
I'm doing this now. I'll start by looking into what formatting tools our webpage renderer has for something like a "big warning message", unless someone already familiar with the renderer has a tip for me!
Update 1: nix: command not found
:cry: I'm on a train with no WiFi and I've never ran nix on this laptop since re-imaging it. My hotspot bill is gonna hurt lol
Update 2: .banner { background-color: var(--gray-bg);
:sunglasses: ayyy instead of nix develop
ing, I just read the CSS file manually and found this existing class that's perfect for the message...
Screenshot_20250113_180856.png
... though I'm unsure yet why its current use isn't appearing on the site... :thinking:
Screenshot_20250113_181126.png
Update 3: :shrug: I'll revisit this with WiFi-installed nix dependencies tomorrow
though I'm unsure yet why its current use isn't appearing on the site...Β :thinking:
Yeah, so I added the banner for warning about roc being WIP to the tutorial recently... but I couldn't figure out how to actually trigger the website to update
So i think it's there in the source on main, but the new site hasn't been uploaded to Netlify
Gotcha, thanks! I can poke at it and expand upon it, if you'd like.
The netlify build has been failing, I'll look into it
Fixed :)
snake_case, PNC and "${str}"
is done for the unicode package https://github.com/roc-lang/unicode/pull/24
A message was moved from this topic to #beginners > Trouble updating roc by JanCVanB.
@Luke Boswell What do you think? https://github.com/roc-lang/roc/pull/7513 (tested with Firefox Web Developer Tools, not locally built)
Screenshot_20250114_101351.png
Update: tested locally; symmetrized
Screenshot_20250114_104607.png
I have a strong desire for symmetric emoji's (same on both sides) :p
Should we put in some work to align the tutorial with the design language of the docs?
I'd love that for the whole roc-lang.org
Yeah, if I got the sign off from Richard I would be happy to lead that effort
Might be a great v0.1.0 thing
It'd be good to have then, but it'd also be useful now
Not sure if it's important to wait to do this, but it would definitely be nice to have a Wow Factor for v0.1.0
Yeah the most important thing is getting the v0.1.0 checklist done. But having this done and ready for v0.1.0 would make for a coherent story
Anthony Bullard said:
Yeah, if I got the sign off from Richard I would be happy to lead that effort
go for it! :thumbs_up:
you did a great job with the docs :smiley:
Thanks Richard! After new lambda syntax that will be My Next
Roc-ansi and roc-isodate are ready with everything but the new unit syntax (and a proper basic-cli uri for examples):
snek_cse |
PNC | "${str}" |
|args| |
unit() ? |
|
---|---|---|---|---|---|
:check: | :check: | :check: | :check: | roc-ansi | |
:check: | :check: | :check: | :check: | roc-isodate |
Anton said:
Luke Boswell said:
Any chance we could sneak this in with the current batch of changes too?
Let's officially make this the last thing though
@Anton I think we may have to include the and
/or
as well so that we can also include zero args ||
-- depending on how that all resolves. I'm not 100% across the details of this, but it seems @Sam Mohr is working on that.
The alternative I guess is to roll back some of the changes we've staged, and slim the scope back to just snek_cse
, PNC
and"${str}"
.
I favour waiting a little longer to get the |args|
and unit ()
(and possibly and
/or
), because it will be one less break-the-world change we need to coordinate across the ecosystem -- and these features were all designed to work nicely together.
The examples we've staged for the upgrade, are looking really nice. I think with all the changes discussed above we will have a solid foundation and future changes for SD will be much less of a breaking impact.
Hmm, yeah, implementing and
and or
first might help
I'll start on those today
Sounds good
In theory, and
and or
are finished, and ||
is basically done but I have lots of tests to update and maybe a couple quirks to iron out
Started a WIP branch for the zero args ()
changes... https://github.com/roc-lang/basic-cli/pull/315
Basically just removing all the tie fighters ({})
|{}|
Awesome!
I've upgraded roc-ray -- it's a WIP because we'll need releases of some deps to finish all the examples and pass CI, but it's working with the breaking changes :smile:
https://github.com/lukewilliamboswell/roc-ray/tree/snake_case_builtins
Could you give a short status update? Are all planned changes merged?
It is hard to keep up with all the changes.
In Roc core, the following have been implemented/merged:
roc format --migrate
snake_case supportroc format --migrate
PNC support"${str}"
interpolation in addition to the old "$(str)"
, with the plan to remove the old interpolation syntax eventually|args| ...
in addition to the old \args -> ...
roc format
movement to new args syntaxThere are two breaking changes remaining that we'd like to get in to Roc core:
lazy_load = || File.read!(...)
)({})
, but will break a lot of code as a result.{ x, y }
to { x, y, ... }
({})
to ()
change which is optional, but nice.For the most part, the important packages and platforms in the ecosystem have been updated to snake_case, PNC, "${str}"
interpolation, and somewhat to |args|
. The last two have not been changed yet, except for maybe one or two by Luke
Sorry, on my phone so it wont be a long one.
Just waiting for the last PR to land https://github.com/roc-lang/roc/pull/7529
Sam's fighting through some bugs with that.
Then we land the basic-cli staged changes for zero args. Cut a testing release.
Upgrade the last bit for all the staged package PRs, and make pre-releases.
And that's basically it... to get us to pre-releases. Then it's upgrade various things and look for any issues. Update the tutorial and website etc and when we're happy we can promote the prereleases to latest.
We were hoping to get a release within a week or two, but I guess that just comes down to how successful I am with getting past this supposed mono issue for zero-arg functions
I think in the meantime, a good task for anyone that has extra free time could be to update the tutorial for the above syntax. It's mostly untouched from all of these changes (though we again got some cleanup on it from Luke the Duke), so getting that ready for a new release with all of these changes would be a great help! Please just announce if you want to own that effort, so we don't have three different people try to do it at the same time
I'm going to try to find some time to help in some way on these tasks, so PLEASE if someone is picking up any of the above please let us know here in this thread!
A draft PR for the ..
spreads in record destructures feature: https://github.com/roc-lang/roc/pull/7534
It's not finished, but most of the work is done (ignoring testing). An explanation of the remaining work is in the description
Okay, off to bed. I can answer any questions in the morning!
And by that, I mean the afternoon...
I spent about an hour doing some println debugging on your branch Sam, and really the only thing I learned is that the issue _seems_ to begin before even specialization
But that could be a gross misreading of the situation
Here's the PR if someone wants to look at my notes and see if I'm even close to tracking down the issue:
https://github.com/roc-lang/roc/pull/7529
I'd like to throw the idea out there of taking what we have in current main, and cutting our plans back to this scope. So effectively pushing zero args ()
in the builtins and {..}
spread operator for open-closed records back for another breaking change.
These changes are sounding like they're deeper than we thought with some unexpected issues and are more behavioural than simple syntax changes. So it may be beneficial to let them simmer longer for testing. I'm guessing we could probably push to have them finished some time this weekend or next week -- but we are putting extra pressure on ourselves to do that.
My thoughts are we could use our time today and tomorrow to cut testing/pre-releases of roc and basic-cli... and update all-the-things to land the staged changes and update things like the examples and tutorial etc.
What do people think?
I'm on the same page. I don't want to up people from getting a release, and we don't know how much longer we are delaying things with these last two changes
I would LOVE to get PNC, snake case and other more stable things out the door
I think we should update the tutorial first though, right?
We should prep a PR, at least
Ok, sounds good
And then merge it when everything else goes out the door
Sounds like a winner
So letβs recap whatβs going out with this release then?
(Of course expecting this plan has consensus and BDFN sign off)
I think itβs this
In Roc core, the following have been implemented/merged:
roc format --migrate
snake_case supportroc format --migrate
PNC support"${str}"
interpolation in addition to the old "$(str)"
, with the plan to remove the old interpolation syntax eventually|args| ...
in addition to the old \args -> ...
roc format
movement to new args syntaxQuoting @Sam Mohr
snek_cse |
PNC | "${str}" |
|args| |
zero-arg () |
open-closed {..} |
---|---|---|---|---|---|
:check: | :check: | :check: | :check: | :cross_mark: | :cross_mark: |
Iβll focus my energy on helping with this
Do we have a todo list?
Iβm happy to work on tutorial
Iβve been doing a lot of doc writing at work lately
Validate that the important platforms and packages have been updated, including:
Most of them are already updated
Do we have a list of top 10 packages?
https://github.com/topics/roc-lang
And also update roc-lang/examples
and Exercism
I think at least roc-lang official packages, examples, exercism, and maybe the roc-lang contributor-owned packages all updated would be ideal
I think everything should just work with a roc format βmigrate
(deleted)
Iβm so glad Iβve written the Roclings exercises to target this release (but not zero args or spread)
@Luke Boswell that link brings me back to the same message
Might be an issue on mobile
I think this is the status
snek_cse |
PNC | "${str}" |
|args| |
|
---|---|---|---|---|
:check: | :check: | :check: | :check: | basic-cli |
:check: | :check: | :check: | basic-webserver | |
:check: | :check: | :check: | examples | |
:check: | :check: | roc-html | ||
:check: | :check: | roc-random | ||
:check: | :check: | :check: | roc-parser | |
:check: | :check: | :check: | roc-json | |
:check: | :check: | roc-ansi |
I'm missing a couple that @Ian McLerran has staged as well -- but the above are the minimum we need to execute a full upgrade including all the roc examples
Does that mean https://github.com/roc-lang/basic-cli/pull/315 no longer blocks cutting the basic-cli@0.19.0 release?
Oops yeah you said that. Yay!
That is my proposal above... and it looks like there is pretty much consensus to do that.
Sounds good! I think we can do Result.map
> Result.map_ok
as well?
I'll do roc-unicode
Oh yeah, I forgot that landed in main too. :grinning:
I'll make a PR to weaver as well (for Result.map_ok) because it's used by the basic-webserver build.roc
Thanks!
basic-cli 0.19.0 pre-release is available
I'm going to look at #7461, I'm hitting it with weaver
Just making it clear - I am working on the tutorial and homepage
An interesting observation on the interactive example on the homepage - everything is effectual:
Screenshot 2025-01-23 at 8.52.32 AM.png
That's a lot of !
and ?
that was a goal!
I want to show that this is a functional programming language where I/O is nice
btw we should change the syntax highlighting there - !
should not be syntax-highlighted
Sure thing
I think I've updated all the syntax and explanations.
There was more to do here than I expected!
There we go!
Screenshot 2025-01-23 at 9.06.34 AM.png
I think that definitely looks better
I think it'll look even better with snake_case
Shoot, I didn't even see that yet. Working on it
Screenshot 2025-01-23 at 9.10.15 AM.png
Should I call out the snake_case the first time we introduce it (line 2)?
nah
I don't think it's notable to people seeing the language for the first time
also, I think we should consider changing the first line to not use |>
anymore
Last question. Do I keep this formatting?
Screenshot 2025-01-23 at 9.13.34 AM.png
it could now be:
store_email!(Path.from_str("url.txt")) ? handle_err!
Richard Feldman said:
also, I think we should consider changing the first line to not use
|>
anymore
You want
store_email!(Path.to_str("url.txt"))
|> ....
Instead?
Oh!
Can ? take an effectful function?
I didn't think it could
it can yeah
because it desugars to a when
so you can use whatever in there
As long as the return type unifies with the function
Ok
This is just to get people familiar with the new error handling, instead of |>
which is going away?
Anthony Bullard said:
Last question. Do I keep this formatting?
Screenshot 2025-01-23 at 9.13.34 AM.png
I'd probably put the close paren on the next line
I wonder if functional programmers will wonder where pipe is since we are in this intermediate state....
yeah I'm okay with that
the main thing is that I don't want to advertise it if we're planning to replace it :big_smile:
as an aside, I wonder if after static dispatch we should just have the snippet be one line:
Screenshot 2025-01-23 at 10.23.29β―AM.png
this already tells you:
it's a lot of info for one line!
I think seeing that right under the word functional could do two things:
Though I agree about the density of information making this beautiful and succinct
doesn't quite fit on mobile, looks like it's 4 characters too long
Screenshot 2025-01-23 at 10.25.39β―AM.png
we could have songs
display as s
on mobile by having the rest of the word be display:none
in css:
Screenshot 2025-01-23 at 11.21.21β―AM.png
Richard Feldman said:
doesn't quite fit on mobile, looks like it's 4 characters too long
I wonder if on mobile you could get away with bumping the code sample font size down a bit
Anthony Bullard said:
I think seeing that right under the word functional could do two things:
- Tickle someones brain ("How does a functional language have methods?")
- Confuse someone ("A functional language doesn't have methods....what is songs here?")
yeah that's good though! The point of that initial code snippet is to:
Yeah, that's probably true.
But we have a ways to go before we get to this snippet being real :-)
It'll be a day to celebrate when it is though
yep, just thinking ahead :big_smile:
It'd be nice if you could fit some new error handling stuff in there too, somehow
But maybe have map_try! and something that could fail would be too much
Something like:
songs.map_try!(|song| Http.get!("https://example.com/songs/${song.id}", Json.utf8)) ? SongFetchError
WIP PR with just homepage changes:
https://github.com/roc-lang/roc/pull/7544
Would we actually format that first code example like that?
Probably okay for now
yeah I don't want to worry about it too much
I think the closing paren being on its own line is a good idea because it's kind of strange otherwise
but having both arguments on one line seems ok even though the formatter wouldn't do that
but either way we're going to change it again when we get to static dispatch :big_smile:
@Luke Boswell, roc-ansi should be good to go - has all syntax changes and examples are using the pre-release of basic-cli (v0.19.0)
@Sam Mohr I opened a PR into your snake_case branch of roc-json which completes the syntax upgrades and the adds basic-cli pre-release as well
roc-json pre-release
I found a temporary issue with @Hannes bundle script... it doesn't use the TESTING release of roc so it can't build the bundle. I just did that manually using roc build --bundle .tar.gz package/main.roc
and uploaded the gz.
Run hasnep/bundle-roc-library@v0.1.0
Running bundle command 'roc build --bundle .tar.br package/main.roc'.
thread 'main' panicked at crates/packaging/src/tarball.rs:294:9:
package/Json.roc failed to parse: NotEndOfFile(@3811)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: Command failed: roc build --bundle .tar.br package/main.roc
thread 'main' panicked at crates/packaging/src/tarball.rs:294:9:
package/Json.roc failed to parse: NotEndOfFile(@3811)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Ian McLerran said:
Luke Boswell, roc-ansi should be good to go - has all syntax changes and examples are using the pre-release of basic-cli (v0.19.0)
Thank you Ian... here is the published pre-release
I'm posting as I go in here... but I'll make a summary post at the end of my day with where I get to.
Actually I realised I can just make a GIST and update it as I go... to save on the spam. Here's the current status
https://gist.github.com/lukewilliamboswell/09ced1b2f606b05b1e74f8f6dfdd3f9d
Hitting a snag with Weaver... @Sam Mohr and I are investigating
+ roc ./build.roc -- --roc roc
thread 'main' panicked at crates/compiler/mono/src/reset_reuse.rs:1244:42:
Expected symbol to have a layout. It should have been inserted in the environment already.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I'm about 70% of the way done with the Tutorial. Hopefully will be able to add that to my PR tomorrow morning before I go to work
Luke Boswell said:
I found a temporary issue with Hannes bundle script... it doesn't use the TESTING release of roc so it can't build the bundle.
If you're using the setup-roc action, then you can use the new testing
option to install a testing version of Roc, like this. Then the bundle action should pick up the correct Roc version from the PATH
.
Thanks @Hannes I missed that... or at least forgot about it
This is fun... lot's of places where this cleans the examples up
# Get current working directory
cwd = Result.map_err(
Env.cwd!({}),
|CwdUnavailable| Exit(1, "Unable to read current working directory"),
)?
# using the new spaced `?` operator
cwd = Env.cwd!({}) ? |CwdUnavailable| Exit(1, "Unable to read current working directory")
Here's the latest status update copied from my live gist -- leave a comment on the gist if you would like me to add anything.
snek_cse |
PNC | "${str}" |
pipe args |
PR / Release |
---|---|---|---|---|
:check: | :check: | :check: | :check: | basic-cli 0.19.0 |
:check: | :check: | :check: | :check: | basic-webserver PR <br>READY for release |
:check: | :check: | :check: | examples PR | |
:check: | :check: | :check: | :check: | roc-html PR <br>awating Hasnep review, testing release |
:check: | :check: | :check: | :check: | roc-random 0.5.0 |
:check: | :check: | :check: | :check: | roc-parser 0.10.0 |
:check: | :check: | :check: | :check: | roc-json 0.12.0 |
:check: | :check: | :check: | :check: | roc-ansi 0.8.0 |
:check: | :check: | :check: | :check: | roc-isodate 0.6.0 |
:check: | :check: | :check: | roc-unicode PR | |
:check: | :check: | :check: | :check: | roc-utils 0.3.0 |
:check: | :check: | :check: | :check: | weaver 0.6.0 |
:check: | :check: | :check: | :check: | plume 0.4.0 |
:check: | :check: | :check: | :check: | rtl PR |
:check: | :check: | :check: | :check: | roc-htmx-tailwindcss-demo <br>BROKEN -- looks like a basic-webserver issue |
I was hoping to get to the examples today... but that might have to wait until tomorrow or next week unless someone picks those up before me.
I've got an annoying bug in my roc-htmx-tailwind demo, that is probably basic-webserver related... but will require some effort to track down.
I'll get examples
Okay, the examples PR should have everything
Unicode should also be good to go
Including updating the codegen
Luke Boswell said:
Hitting a snag with Weaver... Sam Mohr and I are investigating
+ roc ./build.roc -- --roc roc thread 'main' panicked at crates/compiler/mono/src/reset_reuse.rs:1244:42: Expected symbol to have a layout. It should have been inserted in the environment already. note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This is what I was investigating too by the way but definitely can't hurt to have more eyes on it :)
Anton said:
I'm going to look at #7461, I'm hitting it with weaver
We solved the issue and made a release for weaver... at least a workaround. It looks like a tag unification bug.
Can you or Sam do a brief write up of your investigation and workaround in https://github.com/roc-lang/roc/issues/7461?
I am going to keep looking at this issue, if we already hit it in wasm4, plume and weaver it's going to happen all over the place.
The issue was from returning an Err
with one of these tag unions. We think it may be related to the aliasing or unification of the tag union.
NameAtSubcommand : { name : Str, subcommand_path : List Str }
OptionAtSubcommand : { option : OptionConfig, subcommand_path : List Str }
ParamAtSubcommand : { param : ParameterConfig, subcommand_path : List Str }
## The types of errors that might be found in a misconfigured CLI.
CliValidationErr : [
OverlappingParameterNames { first : Str, second : Str, subcommand_path : List Str },
OverlappingOptionNames { left: OptionAtSubcommand, right: OptionAtSubcommand },
InvalidShortFlagName NameAtSubcommand,
InvalidLongFlagName NameAtSubcommand,
InvalidCommandName NameAtSubcommand,
InvalidParameterName NameAtSubcommand,
OptionMustHaveShortOrLongName { subcommand_path : List Str },
InvalidOptionValueType OptionAtSubcommand,
InvalidParameterValueType ParamAtSubcommand,
OverrodeSpecialHelpFlag OptionAtSubcommand,
OverrodeSpecialVersionFlag OptionAtSubcommand,
]
I'd say we're didn't get anywhere close to an underlying issue, but the symptom is what Luke pointed out
Tutorial is getting very close. Doing a review right now
Ok, I think it's mostly done. I have a single TODO:
try
keyword?I'm going to push what I have, and check back at lunch for people's opinions
- Do we get rid of mentions of
try
keyword?
@Richard Feldman
I think we should remove mentions given it is deprecated now that we have PNC so ?
is preferred.
Well only Brendan has responded....I think I'm just going to go for it. I'll promote the "Under construction" section for "?" postfix and put it in place of the section on "try"
Kill try
dead
I think we then should do some work to format try as ? then when we format all applys as PNC
That's a good idea
There are semantically identical correct?
Did we fix the ? + |> bug?
@Anton ? I think so..
They literally desugar to the same thing, so yes
I did not yet solve https://github.com/roc-lang/roc/issues/7530
I think I know a decent workaround for the #7461 issue. Tomorrow I'll make a small investigative report for J.Teeuwissen, this part of the code is from his master thesis, he may know a proper fix. If not, we can ship my workaround.
Awesome to have so many smart people at our disposal
I have push up what I think is the last of the website/tutorial changes to my PR. Will mark it as ready for review
I could review in a few hours, if you need me :grinning:
I should have it covered
I have addressed all review feedback
There's a comment from Anton you didn't fix at the top of the PR comments
I'm just building basic-ssg now... I forgot to upgrade that yesterday
Sorry, missed that. Fixed and pushed
@Anthony Bullard 2 comments left from me, then we're good
The last thing is the comment in the Roc file, is this needed to ship?
If so, that's fine. It'll just make the logic for handling the space a little more complicated.
These are both code cleanliness
I'm happy to merge
Approved, up to you when to merge
I'm trying to address that comment and dealing with some stupid compiler crash due to something deep in mono being unhappy about when
branches being empty...
Not worth the effort
Fixed
See if you are satisfied
If you see a when
nested in an if-then-else
, you know why
Bellissimo
re-approved
:tada:
That was a _LOT_ of work. Hopefully we can find a way to make that slightly less painful for zero-args and SD
If not for the Glory of VIM I may not have had the fortitude to get it done
I expect we won't be doing nearly as much work for other syntax changes
But the future path is for this to be in multiple files
Yeah, that'll help a bit
Which should fall out of the rewrite?
I think so. Something more Rust Book-y would be nice
I need to head out for a few hours... heres the pre-release for basic-ssg https://github.com/lukewilliamboswell/basic-ssg/releases/tag/0.8.0
https://github.com/rust-lang/mdBook pretty nice
In terms of navigation/structure - not content
I have a CI issue I didn't resolve so I haven't merged into main
It looks like from the table we just need to reformat examples and roc-unicode to have pipe args?
Oh no, looks like roc-unicode is good
I already did those
The examples PR is draft...
So I guess we are just waiting on that PR to land
Are we happy with basic-ssg just having a pre-release compatible ?
I'm not sure what you mean?
I mean are we blocked on shipping the nightly release until basic-ssg has a full release that is compatible with it
I think we should make a release for basic webserver and have examples pass CI before we promote everything to latest.
We should be able to achieve that today, and then land your tutorial update with that.
Sounds like a plan!
I'm not sure where we got to with webserver and examples overnight. I'll have a look later and make another summary post with everything.
:+1:
Just out for a fun run and breakfast :smile:
Once we merge all this stuff, we should move ahead with Luke's #ideas > roc release management plan
It feels like the right time
Luke Boswell said:
I have a CI issue I didn't resolve so I haven't merged into main
:man_facepalming: when you download a linux binary and try to run that in a macos CI...
Luke Boswell said:
I need to head out for a few hours... heres the pre-release for basic-ssg https://github.com/lukewilliamboswell/basic-ssg/releases/tag/0.8.0
Bit of a fast follow up but heres a full release of basic-cli https://github.com/lukewilliamboswell/basic-ssg/releases/tag/0.9.0
I've restored the prebuilt Windows host binaries.
@Brendan Hansknecht -- I just removed the TCP/HTTP features from basic-ssg for now until we land that hyper upgrade. It was such a new feature, no-one could have possibly used it yet anyway.
I've kicked-off CI for building basic-webserver 0.12.0
Ok, so I've looked at everything now @Anthony Bullard and updated my
live gist
It looks like everything is ready, we have pre-releases for everything and all tests are passing everywhere.
All we need now is a new release of basic-webserver, then that will complete examples.
Assuming no new issues with those last steps, I recommend we mint a fresh nightly, promote all the releases, and merge the tutorial update PR to update the website.
:smiley:
LFG!
Sam Mohr said:
But the future path is for this to be in multiple files
I think we should try to keep the code in the md file, make the snippets self contained and implement hidden roc line support (some discussion in) in basic-ssg and roc test file.md
. Things are much more likely to stay in sync if the code and explanation do not live in separate files. Files getting out of sync has already proved to be a problem with the examples repo which uses the snippet transclusion.
I'm talking about when Richard entirely redoes the tutorial. Until then, the current format is very convenient even if its annoying to update the whole thing in one go
Oh like one file per chapter or something like that?
Yep
And we have markdown checking already at least somewhat working, we'd use that for validating embedded examples
Assuming no new issues with those last steps, I recommend we mint a fresh nightly, promote all the releases, and merge the tutorial update PR to update the website.
A new nightly will break exercism, I'll update https://github.com/exercism/roc/pull/171 today so that's ready.
Let me/us know if you would like some help with that
Can someone make a minimal upgrade guide from current nightly to current TESTING?
I'll look into it
Do you know how to tell which commit the nightly is from? All I can see is the time of upload
If you download it and extract it, the commit is in the folder name
Thanks
Upgraded basic-ssg for www
I made an upgrade guide for the changes and sent them to Anton
basic-webserver pre-release is here
All tests passed on the examples PR https://github.com/roc-lang/examples/pull/228
I also hit https://github.com/roc-lang/roc/issues/7530 again in the exercism repo. It's easy to work around if you know what's up, but it's a bad upgrade experience. Can someone look into a fix?
I'd like to hold the release until this issue is fixed but feel free to share your opinion.
Let me look into it now
I have to head off to go to my neighbor's birthday party.
It looks like my workaround for #7461 is the only major thing that remains.
I'm going to attempt the TESTING>nightly release on Monday.
Do we have a list of all changes going out in this nightly? I mean outside of the obvious syntax changes? Hopefully spanning the ecosystem?
Sam made an upgrade guide
Due to #7548 we may need to redo some of the pre-releases
We should only need to do that for code that wasn't working without that PR, right?
e.g. basic-cli will need this for sure https://github.com/roc-lang/basic-cli/pull/319
How did basic-cli
get to prerelease with this break?
Just wondering
Sam Mohr said:
We should only need to do that for code that wasn't working without that PR, right?
I'm not sure
Sam Mohr said:
How did
basic-cli
get to prerelease with this break?
Let me check
Ok, looks like we did not test Path.read_utf8, only File.read_utf8
That makes this more likely "We should only need to do that for code that wasn't working without that PR, right?"
Great!
Path.read_utf8
was tested in the examples repo (CommandLineArgsFile) so "We should only need to do that for code that wasn't working without that PR" does not apply unfortunately
File.read_utf8
calls Path.read_utf8
internally
INVALID TRY TARGET is a compile error so fortunately if it roc checks with the latest TESTING no new release will need to be made.
It looks like my workaround for #7461 is the only major thing that remains
My workaround did not suffice, I've sent a message to J.Teeuwissen :fingers_crossed:
For those willing to help out for this breaking release, we need to check for roc check
errors for all these repos (except basic-cli). Can you make an extra column on your gist for this @Luke Boswell?
I'm going to attempt the TESTING>nightly release on Monday.
This is going to take some more time...
I am sure I've ran roc check on all those repos already. What is the issue here?
I think basic-cli path thing slipped through because we made the upgrade and landed that in basic-cli main before we removed/changed the try thing from roc. So all the others should be fine.
Anton said:
For those willing to help out for this breaking release, we need to check for
roc check
errors for all these repos (except basic-cli). Can you make an extra column on your gist for this Luke Boswell?
I just ran roc check
on everything again with no issues. I didn't check every example.
Luke Boswell said:
I am sure I've ran roc check on all those repos already. What is the issue here?
PR#7548 changed desugaring but it looks like it rarely breaks things.
I just ran
roc check
on everything again with no issues.
What version of roc did you use?
Anton said:
My workaround did not suffice, I've sent a message to J.Teeuwissen :fingers_crossed:
J.Teeuwissen is on the case :detective:
So what is the status of the new release?
Once #7461 is fixed we're ready to go, except for minor things like release notes etc.
The current basic-cli 0.19.0 link will need to be replaced as well, due to PR#7548. I'm about to build a new basic-cli release.
The old 0.19.0 link is gone now, it's now https://github.com/roc-lang/basic-cli/releases/download/0.19.0/Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk.tar.br
Also did someone change basic-cli 0.19.0 to a draft release earlier?
I don't use draft releases because publishing changes the assets links
Luke Boswell said:
I didn't check every example.
Searching examples for "?(" should show you the spots that need to be changed.
I just ran
roc check
on everything again with no issues. I didn't check every example.
basic-webserver did hit an error:
+ roc check ./examples/dir.roc
ββ INVALID TRY TARGET in ./examples/../platform/Path.roc βββββββββββββββββββββββ
This expression cannot be tried with the ? operator:
310β |> Result.map_err?(|read_err| FileReadErr(path, InternalIOErr.handle_err(read_err)))
^^^^^^^^^^^^^^
I expected a Result, but it actually has type:
Result ok a, (a -> b) -> Result ok b
Hint: Did you forget to wrap the value with an Ok or an Err tag?
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
1 error and 0 warnings found in 25 ms.
I'll make a new tar.br for that one.
Was it formatted that way?
As in, was this output from roc format --migrate
?
Yes
Indeed:
basic-webserver on ξ HEAD (db94e89) via π¦ v1.79.0
β― cat platform/Path.roc | rg read_err
|> Result.mapErr? \read_err -> FileReadErr path (InternalIOErr.handle_err read_err)
basic-webserver on ξ HEAD (db94e89) via π¦ v1.79.0
β― roc format --migrate platform/Path.roc
basic-webserver on ξ HEAD (db94e89) [!] via π¦ v1.79.0
β― cat platform/Path.roc | rg read_err
|> Result.map_err?(|read_err| FileReadErr(path, InternalIOErr.handle_err(read_err)))
basic-webserver on ξ HEAD (db94e89) [!] via π¦ v1.79.0
β― roc version
roc built from commit 0e35e33f85, committed at 2025-01-28 09:57:55 UTC
Damn
Ok definitely file an issue for that assigned to me
Anton said:
Also did someone change basic-cli 0.19.0 to a draft release earlier?
Looks like github does this automatically when the tag is changed
@J.Teeuwissen was able to fix #7461 :tada:
The current basic-cli 0.19.0 link will need to be replaced as well
I've replaced the old basic-cli link everywhere I could.
I would like to wait on #7555 before the release, any objections?
You're online tomorrow, right?
I might be able to fix that in like 20 minutes
I can do it tonight
Whoever wants to review it: https://github.com/roc-lang/roc/pull/7557
Hopefully all is well with this change, gotta go to bed :-)
It looks good to me, I can nurse it through most issues
Looks like youβll have to merge manually since the fuzzer check is still failing
@Anthony Bullard FWIW that fuzzing failure appears to be new from your PR
Formatting bug; formatting didn't reparse to the same AST (after removing spaces)
* * * Source code before formatting:
-na(n)?()n
* * * Source code after formatting:
-na(n)()? n
How would we handle this in our fuzzer? should this be only behind the --migrate
flag?
This PR unconditionally moves the ? for pnc calls
That part should probably be behind a --migrate
flag
If we don't want to put that behind --migrate
, we'd need to also change the impl of Normalize
to account for that
I'd assert that it should be behind --migrate
in that it is actually a semantic change (but for admittedly strange code)
In fact, I'd go as far as to say that particular transformation shouldn't live long at all
I believe that's blatently incorrect - but necessary temporarily, in order to help migrate some code that was incorrectly partially migrated
n?(1)
does actually have a distinct meaning now - in that n
is a Result (Num->b) e
, and you're unwrapping that func first and then calling it
https://github.com/lukewilliamboswell/roc-ray/pull/85
WIP roc-ray upgrade -- almost completed. Needs a pass over docs and fresh nightlies for CI. But otherwise should be gtg :smiley:
Also completed the upgrade for the zig and rust platform templates
https://github.com/lukewilliamboswell/roc-platform-template-zig
https://github.com/lukewilliamboswell/roc-platform-template-rust
It was my understanding that the try suffix was only valid on Applys. Not results in general
you can do ok = result?
if that's what you're talking about
That is wild. Ok thatβs what I get for trying to help 10 minutes before bed :rolling_on_the_floor_laughing:
So should we merge this at all or should I close it?
Your formatting change already got merged earlier
Because fmt canβt know for certain if this is correct
Oh! Youβre right
:shrug: it's pretty minor anyway, it's maybe annoying if it formats incorrectly but you'll get a compiler warning
I think we're good to go
Hmm
Like Joshua said this should probably be reverted after some time
Agreed
Or should remain in only the WSA->PNC migration
You actually couldnβt possibly express the same thing as func?(arg1, arg2)
in WSA. Only func(arg1, arg2)?
Unless we make (func_result?)(arg1, arg2)
valid
Oh yeah, in WSA I guess you (maybe?) could write (func?) arg1 arg2
If you are trying to call a function value after unwrapping
Ok, now we just need to wait for a review from the good people at exercism for https://github.com/exercism/roc-test-runner/pull/22
roc 0.0.0-alpha2 pre-release is available
I'll check in tomorrow morning to flip the final switches :)
The fuzzer issue discussed above is fixed in https://github.com/roc-lang/roc/pull/7560
Anton said:
Ok, now we just need to wait for a review from the good people at exercism for https://github.com/exercism/roc-test-runner/pull/22
No review yet :( I've mentioned them again in a comment on the PR
It's here :tada: :champagne: :rock_on:
:tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada::tada:
Thanks for your hard work with release management @Anton
Last updated: Jul 06 2025 at 12:14 UTC