DEV Community

ringabout
ringabout

Posted on

3 1 1 1 1

My Nim Development Weekly Report (3/19)

Progress

Checks the potential errors with closure calls

fixes #19857; Exception raised in closure may be "skipped" in ORC.

Adds a prepass for codeReordering

add a prepass for codeReordering.

To keep backwards compatibility. It adds a prepass for codeReordering. Before processing all the source code, it iterates all the nodes and looks for {.experimental: "codeReordering"}. If the flag is found, it will enter the processing in the codeReordering mode.

Forbids changing branch of an object variant in ORC

fix #18977; disallow change branch of an object variant in ORC.

type
  E = enum
    a, b, c, d
  X = object
    v: int
  O = object
    case kind: E
    of a:
      a: int
    of {b, c}:
      b: float
    else:
      d: X

proc `=destroy`(x: var X) =
  echo "x destroyed"

var o = O(kind: d, d: X(v: 12345))
doAssert o.d.v == 12345

doAssertRaises(FieldDefect):
  o.kind = a
Enter fullscreen mode Exit fullscreen mode

You cannot change the branch of o anymore unless you assign to it the same kind or use {.cast(uncheckedAssign).} to permit the operation.

o.kind = d
{.cast(uncheckedAssign).}:
  o.kind = a
Enter fullscreen mode Exit fullscreen mode

Weekly collection

https://forum.nim-lang.org/t/9908 (2/19)

https://forum.nim-lang.org/t/9940 (2/26)

https://forum.nim-lang.org/t/9970 (3/5)

https://forum.nim-lang.org/t/9989 (3/12)

Participating in contributions

Following The Roadmap 2023 for community building , you could join us in the matrix space where we discuss how to build a community. We appreciate doable suggestions and helps, such as improving the workflow, implementing the roadmap, suggesting doable tasks, reviewing code from contributors. United we stand. We shall work together to make the community thrive.

Sponsorship

Many thanks to @Yepoleb, @lenis0012, @pietroppeter, @Clonkk, @mode80, @phil, @CxPlanner, @shirleyquirk, @elcritch, @geotre, @thinkwelltwd, @xrfez, @enthus1ast, @piertoni, @Dnanilem for sponsoring me on GitHub.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay