Skip to content

fix error when atomicArc shallowCopy is not defined#148

Merged
flyx merged 2 commits into
flyx:develfrom
YesDrX:fix_atomicArc
Nov 23, 2025
Merged

fix error when atomicArc shallowCopy is not defined#148
flyx merged 2 commits into
flyx:develfrom
YesDrX:fix_atomicArc

Conversation

@YesDrX

@YesDrX YesDrX commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

when compile with mm:atomicArc, will get error : 'shallowCopy is not defined'.

@YesDrX

YesDrX commented Nov 4, 2025

Copy link
Copy Markdown
Contributor Author

@flyx please review

@flyx

flyx commented Nov 5, 2025

Copy link
Copy Markdown
Owner

Thanks for contributing!

I think the more future-proof solution would be to just always use move, which I suppose should suffice to get the compiler to not deep-copy strings. However documentation of the stdlib is still lacking, so I am not entirely sure on this. Give me a day or two to dig around and test.

@YesDrX

YesDrX commented Nov 5, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for contributing!

I think the more future-proof solution would be to just always use move, which I suppose should suffice to get the compiler to not deep-copy strings. However documentation of the stdlib is still lacking, so I am not entirely sure on this. Give me a day or two to dig around and test.

How about use when(compiles)?

  when compiles(shallowCopy(start, ctx.input.next())):
    shallowCopy(start, ctx.input.next())
  else:
    start = ctx.input.next()

@flyx

flyx commented Nov 5, 2025

Copy link
Copy Markdown
Owner

Yeah, the compiles solution would do. Can you modify your PR to do this? ideally with a comment that it's for the different GC mechanisms.

@YesDrX

YesDrX commented Nov 6, 2025

Copy link
Copy Markdown
Contributor Author

Yeah, the compiles solution would do. Can you modify your PR to do this? ideally with a comment that it's for the different GC mechanisms.

sure, done. @flyx pls review

@flyx flyx merged commit fc823e6 into flyx:devel Nov 23, 2025
8 checks passed
@flyx

flyx commented Nov 23, 2025

Copy link
Copy Markdown
Owner

Merged, thanks! Sorry for the delay.

Since this prevents people from using the lib, I tagged release 2.2.1 to incorporate this fix. CI has problems with it but that's because GitHub did a booboo; I ensured locally that it works on macOS.

@YesDrX

YesDrX commented Nov 26, 2025

Copy link
Copy Markdown
Contributor Author

awesome. thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants