Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null safety #86

Merged
merged 15 commits into from
Mar 11, 2021
Merged

Null safety #86

merged 15 commits into from
Mar 11, 2021

Conversation

WieFel
Copy link
Collaborator

@WieFel WieFel commented Mar 4, 2021

Closes #85

Copy link
Collaborator Author

@WieFel WieFel left a comment

Choose a reason for hiding this comment

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

@daadu need your help on some things

lib/scaffold.dart Outdated Show resolved Hide resolved
lib/scaffold.dart Outdated Show resolved Hide resolved
lib/scaffold.dart Outdated Show resolved Hide resolved
lib/scaffold.dart Outdated Show resolved Hide resolved
lib/scaffold.dart Outdated Show resolved Hide resolved
@WieFel
Copy link
Collaborator Author

WieFel commented Mar 4, 2021

Also: should example/ and demo/ also be migrated? @daadu

For demo we need gallerize package to be migrated, which still waits on flutter_highlight (git-touch/highlight.dart#18) to be migrated.

@daadu
Copy link
Member

daadu commented Mar 9, 2021

@WieFel Should we merge this to master?

Or release "null-saftey" to different version series "v0.6.x". This is until we are supporting "non-null safety" in v0.5.x.

Any new fix, will need to be merged with both. Later we can merge them.

@daadu
Copy link
Member

daadu commented Mar 9, 2021

@WieFel Should we merge this to master?

Or release "null-saftey" to different version series "v0.6.x". This is until we are supporting "non-null safety" in v0.5.x.

Any new fix, will need to be merged with both. Later we can merge them.

@WieFel Give me your views on it.

If the user does not uprgade his project to "null safety", will our package break things? if that is true, then we can merge this to master.

@daadu daadu changed the title WIP: Null safety Null safety Mar 9, 2021
@WieFel
Copy link
Collaborator Author

WieFel commented Mar 10, 2021

If the user does not uprgade his project to "null safety", will our package break things? if that is true, then we can merge this to master.

I just played around with it. I downgraded Flutter to version 1.22.6 and created a sample app into which I imported backdrop null-safety branch. When doing flutter pub get, the following error arises:

The current Dart SDK version is 2.10.5.

Because backdrop_nullsafety_test depends on backdrop from git which requires SDK version >=2.12.0 <3.0.0, version solving failed.
pub get failed (1; Because backdrop_nullsafety_test depends on backdrop from git which requires SDK version >=2.12.0 <3.0.0, version solving failed.)

(where backdrop_nullsafety_test is the name of my freshly created app)

Thus, by applying null-safe code to master we would force users to upgrade to Flutter 2.0.0, which isn't so bad in my opinion.

@WieFel
Copy link
Collaborator Author

WieFel commented Mar 10, 2021

@WieFel Should we merge this to master?

Or release "null-saftey" to different version series "v0.6.x". This is until we are supporting "non-null safety" in v0.5.x.

Any new fix, will need to be merged with both. Later we can merge them.

@daadu In my opinion it requires just additional effort if we maintain a "null-safety" and "non-null-safety" version in two different branches.
Also other packages don't do it, like: cupertino_icons, flutter_launcher_icons, ...

Those are way more popular than backdrop. So I would say if we just release the new null-safe version as 0.6.0, we are fine.

@proninyaroslav what do you think about this?

@proninyaroslav
Copy link
Contributor

@WieFel
The library is still actively developing and I don't think that such a strict separation is necessary, thereby creating legacy at an early stage. API essentially remains the same. Switching to the null safety version is not painful when using backdrop in a project.

@daadu
Copy link
Member

daadu commented Mar 11, 2021

@WieFel @proninyaroslav Ok then, lets release this as v0.6.0, with a note in README that explains the breaking change.

@WieFel Can you add that note?

@daadu
Copy link
Member

daadu commented Mar 11, 2021

@WieFel Can you add that note?

Added myself.

@WieFel
Copy link
Collaborator Author

WieFel commented Mar 11, 2021

LGTM 🎉

@WieFel WieFel merged commit db1831c into master Mar 11, 2021
@daadu daadu deleted the null-safety branch March 11, 2021 09:27
@daadu
Copy link
Member

daadu commented Mar 11, 2021

This fix/feature has landed with v0.6.0 on pub.dev.

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.

migrate to null-saftey
3 participants