rdkcentral / Lightning-SDK

SDK for Lightning framework
Apache License 2.0
130 stars 69 forks source link

Why is lightningjs/core dependency importing wildcard version? #265

Closed xsorifc28 closed 2 years ago

xsorifc28 commented 3 years ago

The dependency should be a specific version of lightningjs/core.

michielvandergeest commented 2 years ago

Sorry for the delayed response @xsorifc28

You are right that normally one would tag a specific version of a dependency.

In this case the wildcard version effectively installs the latest version of Lightning Core when you create a new App project (via the Lightning-CLI for example)

xsorifc28 commented 2 years ago

I understand the reason for wildcard, but it can lead to unexpected behavior when upgrading to latest version of the sdk.

Shouldn't each version of the sdk be tied to (at most) a minor version?

michielvandergeest commented 2 years ago

Ideally it would, yes. Historically the Lightning (core) version has always been separated from the Lightning-SDK, because that's the way it works in the context of the metrological store. There the Lightning Core framework is preloaded and reused by all apps (instead of being bundled).

This works as long as the Lightning version is always the latest and is backwards compatible with previous versions. So far we've managed to do this without issues.

In the future with the next big release of Lightning, we might change this concept as we are undoing some of the existing intertwining between Lightning as a framework and the Metro app platform