Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@jamesderlin
Copy link
Contributor

-[FlutterDartProject initFromDefaultSourceForConfiguration] no
longer seems very useful. It calls -initWithPrecompiledDartBundle:
or -initWithFlutterAssets:dartMain:packages:, but since it now
passes nil for all arguments, both paths end up doing the same
thing.

Additionally, -initFromDefaultSourceForConfiguration is awkward to
use in Swift. The automatically generated Swift interface is:

public convenience init!(fromDefaultSourceForConfiguration: ())

and it's not obvious how to call that.

Let's deprecate -initFromDefaultSourceForConfiguration and instead
expect callers to use the existing -init method. (We can make
-init do different things for different build configurations later
if necessary.)

Bonus: Rename some parameters to make it more obvious when they may
be nil.

…#18886)

`-[FlutterDartProject initFromDefaultSourceForConfiguration]` no
longer seems very useful.  It calls `-initWithPrecompiledDartBundle:`
or `-initWithFlutterAssets:dartMain:packages:`, but since it now
passes `nil` for all arguments, both paths end up doing the same
thing.

Additionally, `-initFromDefaultSourceForConfiguration` is awkward to
use in Swift.  The automatically generated Swift interface is:

    public convenience init!(fromDefaultSourceForConfiguration: ())

and it's not obvious how to call that.

Let's deprecate `-initFromDefaultSourceForConfiguration` and instead
expect callers to use the existing `-init` method. (We can make
`-init` do different things for different build configurations later
if necessary.)

Bonus: Rename some parameters to make it more obvious when they may
be `nil`.
@jamesderlin
Copy link
Contributor Author

I'm going to temporarily close and reopen this to try to get Travis to rerun its test.

@jamesderlin jamesderlin reopened this Jul 26, 2018
@Hixie
Copy link
Contributor

Hixie commented Jul 30, 2018

cc @xster @chinmaygarde

@jamesderlin
Copy link
Contributor Author

BTW, I don't have commit access, so someone will need to merge my change.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants