Skip to content

Conversation

HT154
Copy link
Contributor

@HT154 HT154 commented Sep 4, 2025

No description provided.

@HT154 HT154 force-pushed the handle-pair-regex-intseq branch 5 times, most recently from 8341e2c to e3440e2 Compare September 10, 2025 20:01
@HT154 HT154 force-pushed the handle-pair-regex-intseq branch from e3440e2 to 49f9593 Compare September 10, 2025 20:25
@bioball
Copy link
Member

bioball commented Sep 24, 2025

We decided to not have Pair because:

  1. We'd like to turn these into Swift tuples if possible
  2. Pair is not meant to store config values, and generally we don't expect them to cross the Pkl <> Swift boundary.

The same logic can be applied to IntSeq and Regex (prefer using native types than bringing our own).

I'm not totally opposed to merging this, but I'd like for more users to flag this as an issue before doing anything here.
It's easier to leave this as unsupported for now and introduce later, than to introduce a breaking change (e.g. if we introduce Pair then change to tuples).

@HT154
Copy link
Contributor Author

HT154 commented Sep 24, 2025

I generally agree with the concerns here and I'm fine not shipping this.

Getting tuples to work here is likely challenging. I spent some time poking at it, but there are obstacles for sure. I think it would be necessary to decode into a Pair struct and then extract the tuple from there, which would mean always synthesizing init (and possibly other methods) in affected generated code.

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