We've just released v1.51.0, bringing PNut_TS up to par with PNut v51a
Here's what's new/fixed:
v1.51.0
Updated Language Support
Add language version support through {Spin2_v51}.
Add command-line -F option which, when specified, causes the .flash file to be written (PNut -ci equiv.)
Preprocessor intermediate files now end with __pre.spin2 (vs. '-pre.spin2')
Preprocessor: #define is no longer affected by command-line -U options
Added #pragma exportdef SYMBOL which makes SYMBOL present as if added with -DSYMBOL on the command line but affects all files compiled after the file containing the #pragma (place in top-most file for best results)
{Spin2_v44} is no longer supported due to changes in data structures beginning in v45
Compatible with PNut versions through PNut_v51a.exe (except for PNut_v44.exe, which is no longer supported)
Performance fix: Issue #2 Compiling FILEs in DAT section needs attention - is slow
We do comprehensive regression testing in preparation for each release. We also add to our regression suite so all new capabilities are tested as well. You can review our coverage testing via regress at PNut-TS Coverage Testing
If you spot any issues with code generation or compilation, you can review the testing process. This should help you identify differences between PNut v51a and PNut_TS v1.51.0.
We look forward to hearing what you find.
As always, you can report issues here, or better yet, if fixes are needed, then report problems at the repository issues page. (You can also see the current list of what's been reported at this page.)
@"Stephen Moraco" said:
@macca i’ve uploaded one with correct content please let me know if fixed.
Aside from the MacOS garbage , yes, it works.
I think there are some missing things, the following sample source is what I used recently to fix most of my issues with pointers, it works with PNut v51a but not with pnut_ts:
{Spin2_v51}
CON
STRUCT sPoint(word x, word y, byte c)
PUB main() | a, b, ^sPoint ptr
a := ptr.x++
a := ++ptr.x
a := [ptr]
a := [ptr]++
a := ++[ptr]
a := ptr[++].x
a := ptr[++].x--
a := --ptr[++].x
a := [++]ptr.x
a := [++]ptr.x--
a := --[++]ptr.x
ptr.x := a
[ptr] := a
ptr[++].x := a
[++]ptr.x := a
a := ptr.x := b
a := ptr[++].x := b
a := [++]ptr.x := b
/home/marco/pnut_ts/pnut_ts -I /home/marco/workspace/spin-tools-ide/library/spin2 StructTest.spin2
pnut-ts: * Propeller Spin2/PASM2 Compiler 'pnut_ts' (c) 2024 Iron Sheep Productions, LLC., Parallax Inc.
pnut-ts: * Version 1.51.0, Build date: 5/1/2025
pnut-ts: * pnut_ts -I /home/marco/workspace/spin-tools-ide/library/spin2 StructTest.spin2
pnut-ts: Wrote StructTest.obj (53 bytes)
StructTest.spin2:7:error:Expected end of line (m281)
StructTest.spin2:7:error:Expected end of line (m281)
pnut-ts: Done
We do comprehensive regression testing in preparation for each release. We also add to our regression suite so all new capabilities are tested as well. You can review our coverage testing via regress at PNut-TS Coverage Testing
If you spot any issues with code generation or compilation, you can review the testing process. This should help you identify differences between PNut v51a and PNut_TS v1.51.1.
We look forward to hearing what you find.
As always, you can report issues here, or better yet, if fixes are needed, then report problems at the repository issues page. (You can also see the current list of what's been reported at this page.)
@wummi said:
Hi Stephen,
I download the new pnut_ts for Mac.
There is something wrong with pnut-ts-macos-arm64-015102.zip 30.4 KB
It is only 30kB long!
Hi, there's nothing wrong. It's just that including the node runtime on the Mac is not working.
So I ask you to install the Node runtime separately.
Once you install the Node.js runtime, the pnut_ts file you downloaded will run just fine. See Instructions
I also try to remind us of this in the release notes.
Good morning Stephen,
/Applications/pnut_ts/pnut_ts v1.51.1 is 991 kByte long.
/Applications/pnut_ts/pnut_ts v1.51.2 is 28 kByte long, this must be wrong!
And I get this when I run pnut_ts:
/Applications/pnut_ts/pnut_ts "-d" VSC.spin2
node:internal/modules/cjs/loader:1408
throw err;
^
Error: Cannot find module 'commander'
Require stack:
- /Applications/pnut_ts/pnut_ts
at Function._resolveFilename (node:internal/modules/cjs/loader:1405:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1061:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1066:22)
at Function._load (node:internal/modules/cjs/loader:1215:37)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
at Module.require (node:internal/modules/cjs/loader:1491:12)
at require (node:internal/modules/helpers:135:16)
at Object.<anonymous> (/Applications/pnut_ts/pnut_ts:11:21)
at Module._compile (node:internal/modules/cjs/loader:1734:14) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/Applications/pnut_ts/pnut_ts' ]
}
Node.js v23.9.0
@wummi said:
Good morning Stephen,
/Applications/pnut_ts/pnut_ts v1.51.1 is 991 kByte long.
/Applications/pnut_ts/pnut_ts v1.51.2 is 28 kByte long, this must be wrong!
And I get this when I run pnut_ts:
Node.js v23.9.0
```
Ok, I'm on this. will investigate and post updated version shortly. Thank you for being persistent in letting me know!
@wummi, The macOS assets for release v1.51.2 have been replaced with the correctly built .zip files.
I've updated my packaging script to (hopefully) prevent this in the future.
Thanks again for pointing this out.
@Stephen, I try to compile my big P2-Project and get: error:OBJ data exceeds 1024k limit
5 month ago PNUT v48 shows the same Error.
Chip has found the problem and fix it in SPIN v49.
He expand the space to 4MB and he found that an internal stack overflow was occurring during compilation when it got six levels deep in objects. Now, it will do all 16 levels
@wummi said:
@Stephen, I try to compile my big P2-Project and get: error:OBJ data exceeds 1024k limit
5 month ago PNUT v48 shows the same Error.
Chip has found the problem and fix it in SPIN v49.
He expand the space to 4MB and he found that an internal stack overflow was occurring during compilation when it got six levels deep in objects. Now, it will do all 16 levels
We did this translation by studying Chip's code and making our typescript version the same or better, so we must have missed something. I'll check with Chip, and then we'll get this fixed.
@Stephen, there is the same problem with VSC Spin2 extension.
When I try to edit my big project i get: [Error - 18:27:05] The Spin2 Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted.
This is new, 3 weeks ago i edit the project with VSC and there are no problems.
@wummi said:
When I try to edit my big project i get: [Error - 18:27:05] The Spin2 Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted.
This is new, 3 weeks ago i edit the project with VSC and there are no problems.
Not the same problem. The latest highlighter is dying on something in your code. Can you share a portion of your crashing code? I'll fix it and release a new version for you.
@Stephen, I found the object which crash the Spin2 Language Server.
It is the biggest object in the project.
When you give me your email, I send you the file.
We do comprehensive regression testing in preparation for each release. We also add to our regression suite so all new capabilities are tested as well. You can review our coverage testing via regress at PNut-TS Coverage Testing
If you encounter any issues with code generation or compilation, you can review the testing process outlined in this document. This should help you identify differences between PNut v51a and PNut_TS v1.51.3.
We look forward to hearing what you find.
As always, you can report issues here, or better yet, if fixes are needed, then report problems at the repository issues page. (You can also see the current list of what's been reported at this page.)
Comments
NEWS
We've just released v1.51.0, bringing PNut_TS up to par with PNut v51a
Here's what's new/fixed:
PNut-TS is found at its new Public Repository, while the latest Releases are also found there at the Releases Page
We do comprehensive regression testing in preparation for each release. We also add to our regression suite so all new capabilities are tested as well. You can review our coverage testing via regress at PNut-TS Coverage Testing
If you spot any issues with code generation or compilation, you can review the testing process. This should help you identify differences between PNut v51a and PNut_TS v1.51.0.
We look forward to hearing what you find.
As always, you can report issues here, or better yet, if fixes are needed, then report problems at the repository issues page. (You can also see the current list of what's been reported at this page.)
Stephen & Chip
Seems that the Linux x64 package contains the ARM executable (same as the Linux arm64 package).
again?
@macca i’ve uploaded one with correct content please let me know if fixed.
@Wuerfel_21 yep, i’m a creature of scripts. Guess I better fix one of them! 😋
Aside from the MacOS garbage
, yes, it works.
I think there are some missing things, the following sample source is what I used recently to fix most of my issues with pointers, it works with PNut v51a but not with pnut_ts:
Commenting line 7, show same error on line 15.
We will add that to our regression test next week.
Thank you for reporting this.
And yeah, packaged that pretty quickly for you as I was heading to the airport 😊
NEWS
We've just released v1.51.1, bringing PNut_TS up to par with PNut v51a
Here's what's new/fixed:
PNut-TS is found at its Public Repository, while the latest Releases are also found there at the Releases Page
We do comprehensive regression testing in preparation for each release. We also add to our regression suite so all new capabilities are tested as well. You can review our coverage testing via regress at PNut-TS Coverage Testing
If you spot any issues with code generation or compilation, you can review the testing process. This should help you identify differences between PNut v51a and PNut_TS v1.51.1.
We look forward to hearing what you find.
As always, you can report issues here, or better yet, if fixes are needed, then report problems at the repository issues page. (You can also see the current list of what's been reported at this page.)
Stephen & Chip
@macca your fixes are in. Thank you for reporting this.
Hi Stephen,
I download the new pnut_ts for Mac.
There is something wrong with pnut-ts-macos-arm64-015102.zip 30.4 KB
It is only 30kB long!
Hi, there's nothing wrong. It's just that including the node runtime on the Mac is not working.
So I ask you to install the Node runtime separately.
Once you install the Node.js runtime, the pnut_ts file you downloaded will run just fine. See Instructions
I also try to remind us of this in the release notes.
Good morning Stephen,
/Applications/pnut_ts/pnut_ts v1.51.1 is 991 kByte long.
/Applications/pnut_ts/pnut_ts v1.51.2 is 28 kByte long, this must be wrong!
And I get this when I run pnut_ts:
Ok, I'm on this. will investigate and post updated version shortly. Thank you for being persistent in letting me know!
@wummi, The macOS assets for release v1.51.2 have been replaced with the correctly built .zip files.
I've updated my packaging script to (hopefully) prevent this in the future.
Thanks again for pointing this out.
@Stephen, I try to compile my big P2-Project and get: error:OBJ data exceeds 1024k limit
5 month ago PNUT v48 shows the same Error.
Chip has found the problem and fix it in SPIN v49.
He expand the space to 4MB and he found that an internal stack overflow was occurring during compilation when it got six levels deep in objects. Now, it will do all 16 levels
We did this translation by studying Chip's code and making our typescript version the same or better, so we must have missed something. I'll check with Chip, and then we'll get this fixed.
@Stephen, there is the same problem with VSC Spin2 extension.
When I try to edit my big project i get: [Error - 18:27:05] The Spin2 Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted.
This is new, 3 weeks ago i edit the project with VSC and there are no problems.
Not the same problem. The latest highlighter is dying on something in your code. Can you share a portion of your crashing code? I'll fix it and release a new version for you.
@Stephen, I found the object which crash the Spin2 Language Server.
It is the biggest object in the project.
When you give me your email, I send you the file.
NEWS
We've just released v1.51.3.
Here's what's new/fixed:
PNut-TS is found at its Public Repository, while the latest Releases are also found there at the Releases Page
We do comprehensive regression testing in preparation for each release. We also add to our regression suite so all new capabilities are tested as well. You can review our coverage testing via regress at PNut-TS Coverage Testing
If you encounter any issues with code generation or compilation, you can review the testing process outlined in this document. This should help you identify differences between PNut v51a and PNut_TS v1.51.3.
We look forward to hearing what you find.
As always, you can report issues here, or better yet, if fixes are needed, then report problems at the repository issues page. (You can also see the current list of what's been reported at this page.)
Stephen & Chip
I left a message for you...