Skip to content

Replace rxdart with stream_transform#836

Open
jiahaog wants to merge 1 commit intoflutter:mainfrom
jiahaog:remove-rxdart
Open

Replace rxdart with stream_transform#836
jiahaog wants to merge 1 commit intoflutter:mainfrom
jiahaog:remove-rxdart

Conversation

@jiahaog
Copy link
Copy Markdown
Member

@jiahaog jiahaog commented Mar 27, 2026

stream_transform is more commonly used internally and is also owned by Google.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-devrel channel on Discord.

stream_transform is more commonly used internally and is also owned by
Google.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request replaces the rxdart dependency with stream_transform and introduces a custom combineLatestAll extension for stream handling. The feedback suggests utilizing the built-in combineLatestList function from the stream_transform package instead of the custom extension, which would simplify the implementation and allow for the removal of the newly added utility file.

@jiahaog jiahaog requested a review from gspencergoog March 27, 2026 03:28
@jiahaog
Copy link
Copy Markdown
Member Author

jiahaog commented Mar 27, 2026

@polina-c would you have any suggestions on how to resolve the layerlens failure here? (included the mermaid diagram below).

It looks like we're checking for cycles between directories. Currently, packages/genui/lib/src/utils/validation_helper.dart depends on model/. It doesn't sound right that this existing dep blocks the model/ from depending on a new file in utils/.

flowchart TD;
catalog-->functions;
catalog-->model;
catalog-->primitives;
catalog-->utils;
catalog-->widgets;
development_utilities-->engine;
development_utilities-->model;
development_utilities-->primitives;
development_utilities-->widgets;
engine-->interfaces;
engine-->model;
engine-->primitives;
facade-->engine;
facade-->interfaces;
facade-->model;
facade-->primitives;
functions-->model;
functions-->primitives;
functions-->utils;
interfaces-->model;
model--!-->utils;
model-->primitives;
transport-->interfaces;
transport-->model;
utils-->model;
utils-->primitives;
utils-->widgets;
widgets-->interfaces;
widgets-->model;
widgets-->primitives;
Loading

@jiahaog jiahaog marked this pull request as draft March 27, 2026 03:34
@jiahaog jiahaog marked this pull request as ready for review March 27, 2026 03:42
@polina-c
Copy link
Copy Markdown
Collaborator

polina-c commented Mar 27, 2026

@polina-c would you have any suggestions on how to resolve the layerlens failure here? (included the mermaid diagram below).

It looks like we're checking for cycles between directories. Currently, packages/genui/lib/src/utils/validation_helper.dart depends on model/. It doesn't sound right that this existing dep blocks the model/ from depending on a new file in utils/.

True.

The tool watches for cycles between items in a directory, that are child directories and child files, without differentiating between them. It assumes that we organize code by files and directories having our mental model in mind and "helps" to keep this mental model clean and simple.

One option to resolve this loop is to declare folders 'utils' and 'helpers', where 'utils' are low level and should not depend on 'model', and helpers are higher level and can depend on model.

Another option is to move validation_helper.dart to 'model', because this helper seems to help to deal with the model.

And, there can be other ways that I did not notice.

Does it answer your question?

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