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

Seperate runInternal & handle error #2140

Merged
merged 2 commits into from
Oct 13, 2018

Conversation

BlythMeister
Copy link
Contributor

Description

Update to the way targets are triggered (non-breaking) to allow for context to be returned and then raiseError called with the context.

Currently, if the context has errors, you do not get the context back.

Another benefit is to allow for stepping into process (more on this later 😉)

Update returning of context objects to allow for stepping into process
@@ -652,6 +652,11 @@ module Target =
|> Observable.subscribe (fun _ -> Environment.Exit 1)
Process.killAllCreatedProcesses() |> ignore
cts.Cancel()

/// Optional `TargetContext`
type OptionalTargetContext =
Copy link
Member

Choose a reason for hiding this comment

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

this can be internal/private?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because it is returned, it can't be

matthid
matthid previously approved these changes Oct 12, 2018
Copy link
Member

@matthid matthid left a comment

Choose a reason for hiding this comment

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

While strictly speaking this is a breaking change I'm fine with merging this (but I have to take another close look at the signatures). Only thing is the docs which should be updated.


// *** Start Build ***
Target.runOrDefaultAndGetContext "Deploy" //Could also use: Target.runAndGetOptionalContext "Deploy"
|> Target.raiseIfErrorOption
Copy link
Member

Choose a reason for hiding this comment

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

raiseIfError as there is no raiseIfErrorOption?

@matthid matthid merged commit fe979ba into fsprojects:release/next Oct 13, 2018
@matthid
Copy link
Member

matthid commented Oct 13, 2018

thanks!

@BlythMeister BlythMeister deleted the TargetContext branch May 11, 2021 15:58
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