Skip to content

Conversation

@b-gyula
Copy link
Contributor

@b-gyula b-gyula commented Jun 24, 2025

scala 2.13 changed the default Seq to immutable.Seq causing io.getquill.context.sql.encoding.ArrayEncoding to restrict the usable collection types to ones inherited from immutable.Seq

Problem

Code using classes with mutable collections does not compile on scala version 2.13+

Solution

There is no reason to restrict the allowed collection types to descendants of immutable.Seq as they were allowed prior scala 2.13

Notes

In fact I would widen the type to Iterable since the existing logic without modification works with Sets also. I can change the PR if you agree...

  • added sizeHint @ collection creation in arrayDecoder
  • Updated link to the contribution guide in the README

Checklist

  • Unit test all changes
  • Update README.md if applicable
  • Add [WIP] to the pull request title if it's work in progress
  • Squash commits that aren't meaningful changes
  • Run sbt scalariformFormat test:scalariformFormat to make sure that the source files are formatted

@getquill/maintainers

b-gyula and others added 8 commits December 11, 2019 17:48
- Doc updated with database actions return values
mergeback
- Add sizeHint in array decoder for better builder performance
- Update link to contribution guide in the README.md
- Remove duplicate, obsolete test ArrayEncodingSpec (same as in quill-test-kit)
@b-gyula b-gyula force-pushed the mutable-ArrayEncoders branch from d04f8be to 214e1a9 Compare June 24, 2025 23:40
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