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

Suggestions for ExecTask #1638

Closed
jawira opened this issue Sep 9, 2021 · 4 comments · Fixed by #1643
Closed

Suggestions for ExecTask #1638

jawira opened this issue Sep 9, 2021 · 4 comments · Fixed by #1643
Assignees
Milestone

Comments

@jawira
Copy link
Contributor

jawira commented Sep 9, 2021

Is your feature request related to a problem? Please describe.

Frequently I see Exec used like this:

<target name="download">
	<exec executable="wget">
	    <arg value="-Obuild/composer.phar" />
	    <arg value="http://getcomposer.org/composer.phar" />
	</exec>
</target>

However you can achieve the same using HttpGetTask, which it seems more appropriate to me.

Describe the solution you'd like

So I'm thinking about adding "suggestions" when some executable are used.

For example, when wget executable is used, Phing will print a suggestion:

$ phing download

Buildfile: /home/deleteme/build.xml

project > download:

     [Exec] Consider using HttpGetTask <==SUGGESTION

BUILD FINISHED

Total time: 0.3684 seconds

Similar suggestion messages can be displayed for things like executable="mv" (use MoveTask) or executable="zip" (use ZipTask).

Describe alternatives you've considered

The alternative is not implement this :)

Additional context

On one hand I think this can be very useful to use the correct Task, on the other hand maybe is too intrusive/verbose.

What are your thoughts? I can work in this feature in you want.

As usual feel free to close this issue if you want :)

@siad007
Copy link
Member

siad007 commented Sep 9, 2021 via email

@mrook mrook added this to the 3.0.0-RC4 milestone Sep 9, 2021
@jawira
Copy link
Contributor Author

jawira commented Sep 11, 2021

@siad007 I think you are right, even if this means that suggestion are going to be rarely displayed :(
Maybe output level can be changed in the future if needed?

@siad007
Copy link
Member

siad007 commented Sep 11, 2021

It might be easy implemented with an own phing command argument like phing -task-suggestions / phing -ts to turn the feature on if needed.

@jawira
Copy link
Contributor Author

jawira commented Sep 11, 2021

oh, a think a custom option is too much, verbose log is ok for me :)
Please see #1643

@siad007 siad007 linked a pull request Sep 11, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants