Skip to content

Revert "[shared_preferences] update List<String> encode/decode" - #8510

Closed
camsim99 wants to merge 1 commit into
mainfrom
revert-8335-listString-encode
Closed

Revert "[shared_preferences] update List<String> encode/decode"#8510
camsim99 wants to merge 1 commit into
mainfrom
revert-8335-listString-encode

Conversation

@camsim99

Copy link
Copy Markdown
Contributor

Reverts #8335.

This is causing shared_preferences/shared_preferences/example/integration_test/shared_preferences_test.dart: shared_preferences_async Async throws TypeError when returned getStringList type is incorrect to fail with what looks like an OOB issue and is blocking the tree currently:

══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure was thrown running a test (but after the test had completed):
Expected: throws <Instance of 'TypeError'>
Actual: <Closure: () => Future<Null>>
Which: returned a Future that emitted <null>
When the exception was thrown, this was the stack:
#0 fail (package:matcher/src/expect/expect.dart:149:31)
#1 _expect.<anonymous closure> (package:matcher/src/expect/expect.dart:125:9)
<asynchronous suspension>
<asynchronous suspension>
(elided 6 frames from dart:async and package:stack_trace)
════════════════════════════════════════════════════════════════════════════════════════════════════

@@ -1,7 +1,3 @@
## 2.4.3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forget our rules here but I thought we couldnt roll back this version if it was published which the existence of an OOB change implies happened.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stuartmorgan please advise. Should we publish a new version?

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

I just realized, I don't think we can revert this. It's been published and may have started converting real-world data to the new form. Updating to a reverted version would lose data.

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

I'll look at the tests when I'm back at my desk to see if we can easily fix forward; hopefully the tests were just too specific to platform implementations. Otherwise I'll need to think about this more and discuss with @tarrinneal

@guidezpl
guidezpl deleted the revert-8335-listString-encode branch August 10, 2026 14:46
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@camsim99@stuartmorgan-g@reidbaker