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

Add scheme actions to build step for TargetScheme #823

Merged
merged 1 commit into from
Apr 13, 2020

Conversation

brentleyjones
Copy link
Collaborator

We say in the documentation that the preActions and postActions of a TargetScheme are applied to all steps. They weren't being applied to the build step though.

@yonaskolb
Copy link
Owner

@brentleyjones this is interesting. Wouldn't this mean an action would run twice? Once on build and then once in the action someone is launching. If so one could argue this should happen on everything except build, or just build

@brentleyjones
Copy link
Collaborator Author

I agree, I found this bug because I wanted it to run on build, but not the others. I submitted the fix based on the description. Ideally it would be build only.

@yonaskolb
Copy link
Owner

Out of interest what breaks when the script is run on the active step and not build?
I'd be open to changing this PR to just happen on build. Can you think of that breaking anything?

Also as a note, the documentation is referring to all build phases instead of all launch types

Scripts that are run before all actions

@brentleyjones
Copy link
Collaborator Author

When you build a static library, it doesn't have a "run" action, you have to use "build". We are trying to collect build statistics that require scripts to be run before and after a build, and it doesn't work for static libraries right now.

Can you think of that breaking anything?

If people were doing something non-build related. I can't think of what one would want to do here, but: https://xkcd.com/1172/

@yonaskolb
Copy link
Owner

Haha, I was actually thinking about that XKCD comic!
I think it will be fine to move everything over to build, which would be the correct behaviour. Could you do that in this PR and also update the documentation for it

Adjusts the preActions and postActions of a TargetScheme to only be applied applied to the `build` step.
@brentleyjones
Copy link
Collaborator Author

@yonaskolb Done!

@yonaskolb yonaskolb merged commit e44dcd3 into master Apr 13, 2020
@brentleyjones brentleyjones deleted the build-scheme-pre-post-actions branch April 13, 2020 13:49
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.

None yet

2 participants