Tcl Library Source Code

View Ticket
Login
Ticket UUID: 4f25e933fc37b3284ec8c068a1366f70753e7169
Title: yaml / json2huddle
Type: Bug Version: 1.21
Submitter: anonymous Created on: 2024-03-25 22:38:58
Subsystem: yaml Assigned To:
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2024-03-26 20:10:08
Resolution: None Closed By: nobody
    Closed on:
Description:
I was using both `yaml` and `json2huddle` at the same time, and the JSON input had a `null` value.

the error can be more simply reproduced by 

e.g. 
```
  chorler@localhost:~> tclsh
  % package require yaml
  0.4.1
  % package require huddle::json
  0.1
  % package require huddle
  0.4
  % ::huddle null
  Invalid subcommand 'null' for type '::huddle::Type_null'
```

IMO - no expert on this:

I think this is because `yaml` and `huddle` clash in the `ensemble` null command.  Also, `yaml` appears to map this to a `string` when huddle expects `null` as it's own type.

I tested a small patch (attached) - it seems to pass existing tests, and tweaking the input to any of the test files to mirror the pkgIndex.tcl does seem to show this failure without.
User Comments: anonymous added on 2024-03-26 20:10:08:
I investigated this further and realised a much more simple fix is probably possible - new patch attached.

I also noticed superclass methods were being ignored because of a case difference in ::yaml::_makeChildType

all 4 test files executed without failures.

Attachments: