Support classic and alternate import syntax in flogo.json#44
Merged
fm-tibco merged 3 commits intoproject-flogo:masterfrom Feb 28, 2019
Merged
Support classic and alternate import syntax in flogo.json#44fm-tibco merged 3 commits intoproject-flogo:masterfrom
fm-tibco merged 3 commits intoproject-flogo:masterfrom
Conversation
This was referenced Feb 22, 2019
af90d6d to
7249247
Compare
7249247 to
5f2c8b8
Compare
Contributor
Author
|
I updated the names of the syntaxes: the classic syntax and the alternate syntax @fm-tibco : I reverted the examples/engine/flogo.json and created examples/alt/engine/flogo.json instead. So the default behaviour is to use the classic syntax. This way the alternate syntax will only be used by advised users. |
fm-tibco
approved these changes
Feb 28, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce? (check one with "x")
What is the current behavior?
Currently imports in the "imports" array of flogo.json file follow the Go import path syntax (including aliases).
Hence it is not possible to know what is the path to the underlying module (if it exists) neither to specify a custom version.
This complicates the interaction of the Flogo CLI with
go modcommands for instance in theflogo createcommand and it prevents the flogo.json to recreate an application in a reproducible way (since all declared imports will always used the @latest stable version available).What is the new behavior?
In PR project-flogo/cli#32, a proposal is made to create a new syntax which would be more verbose while remaining readable.
This syntax is aimed at keeping good default values (no version = latest, no alias by default).
The only
mandatoryadd-on is the : when the original import path does not point to a Go module like the github.com/project-flogo/contrib/activity/log contribution.So
becomes
Notice the : separating the path to the module and the relative import path.
Notice also that the github.com/project-flogo/flow import is unchanged as it already points to a Go module and it is expected to use latest version.
Update : this new syntax format can totally be mixed with the old one. Using the new one gives more flexibility to manage dependencies under the hood. Hence I suggest to name those two compatible syntaxes the classic syntax and the alternate syntax.