Skip to content

Conversation

lagartoverde
Copy link
Contributor

This is more a PR to start a discussion than a real PR.
With using the sparql we have discovered a pretty nasty bug, if you try to convert a value that is not originally boolean (like when you get it from a sparql query it will always default to true, because "false" === true.
I feel like this should be solved because it introduces these kinds of silents bugs. For example we didn't notice the bug until someone complained that the data in the LDES feed was wrong. But I also think the current behaviour is expected so I propose 2 solutions:

  • First one we keep the current behaviour, but introduce an error thrown, this will not affect current users unless they had this bug in their system, and I think is a good thing to be alerted of
  • Second one we introduce a small list of truthy values (this is what I'm currently doing in the LDES producer one level above). I don't think this will affect any current applications unless they were using this function wrong, but will help the majority of other apps.

@lagartoverde lagartoverde marked this pull request as draft August 28, 2025 13:35
@lagartoverde
Copy link
Contributor Author

After giving it a nights thought I would rather implement number 2, as some users could be using the function with 0 and 1 without problems.
The second solution just expands the functionality

@madnificent
Copy link
Member

madnificent commented Aug 29, 2025

Added reviewers as per Oscar's request. Also for @nvdk :)

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