Adv3Lite Version 1.6 now released

There’s no particular advantage to moving the tads.org web site to IFTF. Mike Roberts can maintain it as-is for as long as he wants. Since it’s not being updated, there’s no effort involved and only a trivial amount of money.

If he ever wants to stop, of course, it would be easy to transfer and then we’d be the ones not updating it. :)

(IFDB was a different situation. That required active moderation effort which Mike wanted to hand off to someone else.)

2 Likes

Thanks for letting me know! I wasn’t aware of this limitation. I’ll add an issue in the repo once I have confirmed it myself.

2 Likes

Am I misunderstanding that VSCode has problems with source files over 1000 lines? Because most of my files are 2k - 4k lines (on Mac) and work fine…

1 Like

Not VSCode specifically. The extension that Tomas made reads the code as you write it to try highlighting potential errors before compile, and when I exceed 1,000 lines, the extension starts crashing with nearly every new character I type.

I don’t know if it’s a line count specifically, but the errors are always complaining about the length variable of something. I haven’t looked into it much because it scrolls so fast when the errors happen.

It still compiles, though, but the highlighting and stuff starts breaking down.

If I’m coding in any other language, I’m not using this extension, so I could probably do a 2k line C# file just fine.

Okay, so I just realized that I might have mistyped a little bit. I don’t think it’s caused by the line count exceeding 1,000 specifically. If someone tries to make a test case with one character on each line, it probably won’t trigger. It would need to be a normal source file that gets up to maybe 1,200 lines, or so.

I’m pretty sure it’s the total character count that causes it, not exactly the line count. I can try to cause it, and post the error I’m finding here. I can also post a ticket on the GitHub, too.

Is it Linux-specific? Because like I said I have 4000 line TADS files that I use with the VSCode extension and no problems. Plus opening 10k liners from adv3 never seems to be a problem either…

Not 100% sure, but seems that locks & keys generates an nil object reference runtime error.

in my experimenting, I implemented, from the library manual, three keys, one brass (the manual example brass key), an iron key, unlocking a backdoor, and the manual’s silver key, and box, where I put the brass key (the idea being implementing the classical “a key for getting another key” puzzle), but if I attempt to unlock the door having in inventory the wrong key, the story is thrown into the runtime error noted above.

the relevant code is:

+ backDoor: Door 'back door; old solid oak' 
  "It's an old oak back door, still very solid."
  otherSide = backDoorOutside
  lockability = lockableWithKey
  isLocked = nil
  keyList = [ironKey]
;
[....]

+ backDoorOutside: Door 'back door; turquoise'
  "The outer side of the back door is painted with a nice shade of turquoise."
  otherSide = backDoor
  lockability = lockableWithKey
  isLocked = nil
;
[....]

+ frontDoor: Door 'front door; solid oak' 
  "It's a solid oak front door, strong enough to resist a siege. "
    
    otherSide = frontDoorOutside
    lockability = lockableWithKey
    isLocked = true
    keyList = [brassKey]
;
[....]

+ frontDoorOutside: Door 'front door'    
    otherSide = frontDoor
    lockability = lockableWithKey
    
;
[....]

// a tiny classical puzzle: a key 4 getting another key...
brassKey: Key 'brass key; medium sized' @redBox  
  "It's just a medium sized brass key, typical of the sort used to lock and
  unlock doors, namely the front door. "
plausibleLockList = [frontDoor, frontDoorOutside, backDoor, backDoorOutside]
actualLockList = [frontDoor, frontDoorOutside]
;
[....]

silverKey: Key 'silver key'
 "a silver key for unlocking the red box."
 actualLockList = [redBox]
;

// the brass key of the key page, alchemically turned into an iron one, for 
// the back door.
ironKey: Key 'iron key; large wrought' @maid  
  "It's a large wrought iron key, typical of the sort used during the XIXth 
century."
  initSpecialDesc = "On an hook on the east wall, above the bed, is a large 
key."
  plausibleLockList = [backDoor, backDoorOutside]
  actualLockList = [backDoor, backDoorOutside]
;

If I don’t have messed around too much or missed some subtle details of the library, this perhaps is a major library bug.

Best regards from Italy,
dott. Piergiorgio.

1 Like

No idea; I only code on Linux. I just assumed other operating systems were getting this problem, too.

EDIT: I think I know a specific code page that I can recreate to cause this specific error. There’s another one I’ve been getting since the 1.6 update, so I’ll spring that one too.

I’ll post the actual error reports I’m getting here, and hopefully make an actual contribution, compared to the vague and useless gesturing I’ve been doing so far. The scientist in me just realized that it might even be an error with another extension, but this only happens when I’m programming in TADS, so I’ve been assuming it’s the TADS extension, which might not be fair to our esteemed Tomas.

A whole cluster of bugs, as it turns out. The main problem is that the verify routine on iobjFor(UnlockWith) is trying to reference the direct object before the parser has resolved what the direct object is (the solution is to use gVerifyDobj in place of gDobj in each case, since this is the kind of situation for which gVerifyDobj was added in version 1.6). There’s also one library message that had {that dobj} where it should have been {that iobj}, with similar results.

Strange that this hasn’t come up before!

I’ll include the fixes in an 1.61 maintenance release in due course (once 1.6 has been out there for long enough for any other issues to come to light), but in the meantime if anyone else needs to fix this, a corrected version of thing.t is now available on the adv3Lite GitHub repo.

3 Likes

Okay! I now have an error report! I started it from when it seems to have noticed me opening the code file.

I added a new function call at line 1207, and the moment the parenthesis began, it threw the error from the “Tads3 Language Server”. Worth noting that until I am done filling the arguments in the function call, it will keep posting this error and switching to the output log with every character I type.

Error Report
[Info  - 10:36:03 AM] Last chosen editor changed to: file:///home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
Fetching 1 low level symbols for: /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
Fetching 1 low level symbols for: /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
[Info  - 10:36:16 AM] Debounce time of 200 has passed.
[Info  - 10:36:16 AM] Diagnosing
[Info  - 10:36:16 AM] Current state(s): [Diagnosing]
[Info  - 10:36:16 AM] Diagnosing went by with no errors
[Info  - 10:36:16 AM] Preprocess and parse /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
[Info  - 10:36:16 AM] Current state(s): Done
[Info  - 10:36:16 AM] Current state(s): [Preprocessing]
Ensuring "/home/jessica/.config/Code/User/globalStorage/toerob.vscode-tads3tools" exists
Ensuring "/home/jessica/.config/Code/User/globalStorage/toerob.vscode-tads3tools/.cache/adv3Lite" exists
Counting row lines done in 33 ms
Postprocessing row lines done in 44 ms
Setting up base directory for project: /home/jessica/tads3projects/TadsSpaceProgram
[Info  - 10:36:17 AM] Current state(s): Done
[Info  - 10:36:17 AM] /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t scanned for macro definitions
Spawning worker to parse a single file: /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
line 813:4 missing ';' at 'addInteger'
Worker finished with result
line 1140:5 missing '}' at '<EOF>'
*** ERROR NODE in (/home/jessica/tads3projects/TadsSpaceProgram/registerMath.t)***
*** ERROR NODE in (/home/jessica/tads3projects/TadsSpaceProgram/registerMath.t)***
/home/jessica/tads3projects/TadsSpaceProgram/registerMath.t parsed successfully in 5007 ms
[worker unassigned]
Fetching 5 low level symbols for: /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
Fetching 5 low level symbols for: /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
Fetching 5 low level symbols for: /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
Fetching 5 low level symbols for: /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
Fetching 5 low level symbols for: /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
Fetching 5 low level symbols for: /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
Fetching 5 low level symbols for: /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
Fetching 5 low level symbols for: /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
Fetching 5 low level symbols for: /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
Fetching 5 low level symbols for: /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
Fetching 5 low level symbols for: /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
Fetching 5 low level symbols for: /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
Fetching 5 low level symbols for: /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t
[Error - 10:36:44 AM] Request textDocument/signatureHelp failed.
  Message: Request textDocument/signatureHelp failed with message: Cannot read properties of undefined (reading 'length')
  Code: -32603 
Fetching 5 low level symbols for: /home/jessica/tads3projects/TadsSpaceProgram/registerMath.t

Now this is another error I’ve been getting since 1.6, also written in the output log of the Tads3 Language Server. This happens every time I write a verify() { } block within dobjFor(___) or iobjFor(___)

Other Error Report
Fetching 30 low level symbols for: /home/jessica/tads3projects/IAmPrey/parkour.t
[Info  - 10:42:05 AM] Last chosen editor changed to: file:///home/jessica/tads3projects/IAmPrey/parkour.t
[Error - 10:42:20 AM] Request textDocument/signatureHelp failed.
  Message: Request textDocument/signatureHelp failed with message: Invalid regular expression: /\s*128))\s*/: Unmatched ')'
  Code: -32603 
Fetching 30 low level symbols for: /home/jessica/tads3projects/IAmPrey/parkour.t

It’s worth noting that in both cases, the server just keeps trucking along and I don’t need to restart anything. However, it does keep switching to the log, closing my terminal, and creating little popups. This can make it really difficult to work, if you have ADHD, lol.

Hopefully this actually gives @Tomas something to actually work with, as opposed to the vague mentions I’ve been making before, lol. Sorry about that.

I see. The problem seems to belong to the signatureHelper. Probably a not so serious issue and rather isolated from the other features. But the helper gets triggered anytime you’re inside the function head and types parentheses, comma, left, right, in order to show info about of the possible arguments so I understand it is bothersome If that triggers an error instead.

I rather not occupy Eric’s thread about adv3Lite with this but thanks again for the report. I’ll add an issue in the repo.

2 Likes

Rock ‘n’ roll!!

I’ve been out of the IF loop for a few weeks for personal reasons, so I missed the announcement of the release. Congratulations, Eric! I’m not going to install the upgrade quite yet, as I still need to do a few bug-fixes on my comp game. If and when I start my next project, I’ll be digging in with the new code.

3 Likes

backporting question:
is feasible, if even possible, porting the ProxyActor class to adv3, as contrib library ? I feel that this can heavily simplify the handling of states, topics and scenes related to NPC(s)…

Best regards from Italy,
dott. Piergiorgio.

1 Like