Author Topic: Converting OXCE to rapidyaml  (Read 22081 times)

Offline Delian

  • Commander
  • *****
  • Posts: 658
    • View Profile
Re: Converting OXCE to rapidyaml
« Reply #195 on: January 28, 2025, 01:57:43 am »
I'd want to see those "nested rulesets" that are causing the loss of error messages first.

Static is a no-go, because it breaks my multi-threading ;)

Offline Yankes

  • Global Moderator
  • Commander
  • ***
  • Posts: 3436
  • Posts: 421
    • View Profile
Re: Converting OXCE to rapidyaml
« Reply #196 on: January 28, 2025, 02:18:16 am »
I'd want to see those "nested rulesets" that are causing the loss of error messages first.

Static is a no-go, because it breaks my multi-threading ;)
Where I used "static" variables that could be problem here? Only static is `YamlErrorHandler` that is stateless.
And all `tree` objects get its own "handler" as global is only fallback if not overridden.


And code that crash without info look like:
Code: [Select]

    reinforcements:
      - type: firstwave
        minTurn: 1
        maxTurn: 1
        maxRuns: 1
        mapBlockFilterType: 1
        spawnZLevels: [7]
        randomizeZLevels: falsee #crash here without info where it is
this is code related to `AlienDeployment`, any `tryRead` will break line info as we call functions like
Code: [Select]
bool read(ryml::ConstNodeRef const& n, ReinforcementsData* val)
as now there is no `root` in sight. as alterative would be refactor all calls to propagate one pointer.
but as `yml::Callbacks` already need have pointer that we control, we could easy store here our `root`.

Offline Delian

  • Commander
  • *****
  • Posts: 658
    • View Profile
Re: Converting OXCE to rapidyaml
« Reply #197 on: January 28, 2025, 02:46:55 am »
Hmm, nevermind that. So you're storing root in the callbacks...

Actually this looks good. It's probably a normal way to use Callbacks, and not a hack at all.

Yes, with that we can get rid of the _root reference from the YamlNodeReader/Writer and we can probably remove the global callbacks that I've set up as well.

Offline Delian

  • Commander
  • *****
  • Posts: 658
    • View Profile
Re: Converting OXCE to rapidyaml
« Reply #198 on: February 15, 2025, 04:14:56 pm »
Rapid YAML 0.8.0 has been released.

It fixes most of the stuff we've reported, such as problems with trailing whitespace, and UTF-8 BOM.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9415
    • View Profile
Re: Converting OXCE to rapidyaml
« Reply #199 on: February 15, 2025, 04:18:07 pm »
Good news.

I'll release OXCE 8.1 with the current ryml version still, because it is tested.

Later we can check if upgrading is worth it.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9415
    • View Profile

Offline Delian

  • Commander
  • *****
  • Posts: 658
    • View Profile
Re: Converting OXCE to rapidyaml
« Reply #201 on: February 23, 2025, 11:19:38 am »
Does it matter if non-existent options are put at the end of options.cfg, or do they need to be correctly sorted together with the rest of normal options?

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9415
    • View Profile
Re: Converting OXCE to rapidyaml
« Reply #202 on: February 23, 2025, 11:23:57 am »
Does it matter if non-existent options are put at the end of options.cfg, or do they need to be correctly sorted together with the rest of normal options?

They don't need to be sorted IMO, can be at the end.

Offline Delian

  • Commander
  • *****
  • Posts: 658
    • View Profile

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 9415
    • View Profile