uProxy-p2p icon indicating copy to clipboard operation
uProxy-p2p copied to clipboard

"grunt clean" deletes Grunt itself

Open matthild opened this issue 12 years ago • 5 comments

Having the build tool delete itself is inconvenient and violates the principle of least surprise. Ideally "grunt clean" would delete derived artifacts but not Grunt itself.

$ grunt clean

  • setup: shell:bower_install
  • setup(unflat): shell:bower_install
  • build_generic_core: typescript:generic_core, copy:generic_core
  • build_generic_core(unflat): typescript:generic_core, copy:generic_core
  • build_generic_ui: typescript:generic_ui, sass:generic_ui, copy:generic_ui
  • build_generic_ui(unflat): typescript:generic_ui, sass:generic_ui, copy:generic_ui
  • build_uistatic: typescript:generic_ui, sass:generic_ui, copy:generic_ui, typescript:uistatic, concat:uistatic, copy:uistatic
  • build_uistatic(unflat): build_generic_ui, typescript:uistatic, concat:uistatic, copy:uistatic
  • build_chrome: typescript:generic_ui, sass:generic_ui, copy:generic_ui, typescript:generic_core, copy:generic_core, typescript:chrome, copy:chrome_app, copy:chrome_extension, shell:extract_chrome_tests
  • build_chrome(unflat): build_generic_ui, build_generic_core, typescript:chrome, copy:chrome_app, copy:chrome_extension, shell:extract_chrome_tests
  • build_firefox: typescript:generic_ui, sass:generic_ui, copy:generic_ui, typescript:generic_core, copy:generic_core, copy:firefox
  • build_firefox(unflat): build_generic_ui, build_generic_core, copy:firefox
  • build_firefox_xpi: typescript:generic_ui, sass:generic_ui, copy:generic_ui, typescript:generic_core, copy:generic_core, copy:firefox, compress:main
  • build_firefox_xpi(unflat): build_firefox, compress:main
  • run_firefox: typescript:generic_ui, sass:generic_ui, copy:generic_ui, typescript:generic_core, copy:generic_core, copy:firefox, mozilla-cfx:debug_run
  • run_firefox(unflat): build_firefox, mozilla-cfx:debug_run
  • test_core: typescript:generic_core, copy:generic_core, typescript:mocks, jasmine:generic_core
  • test_core(unflat): build_generic_core, typescript:mocks, jasmine:generic_core
  • test_ui: typescript:generic_ui, sass:generic_ui, copy:generic_ui, jasmine:generic_ui
  • test_ui(unflat): build_generic_ui, jasmine:generic_ui
  • test_chrome_extension: typescript:generic_ui, sass:generic_ui, copy:generic_ui, typescript:generic_core, copy:generic_core, typescript:chrome, copy:chrome_app, copy:chrome_extension, shell:extract_chrome_tests, typescript:chrome_mocks, jasmine:chrome_extension
  • test_chrome_extension(unflat): build_chrome, typescript:chrome_mocks, jasmine:chrome_extension
  • test: typescript:generic_core, copy:generic_core, typescript:mocks, jasmine:generic_core, typescript:generic_ui, sass:generic_ui, copy:generic_ui, jasmine:generic_ui, typescript:chrome, copy:chrome_app, copy:chrome_extension, shell:extract_chrome_tests, typescript:chrome_mocks, jasmine:chrome_extension
  • test(unflat): test_core, test_ui, test_chrome_extension
  • build: typescript:generic_ui, sass:generic_ui, copy:generic_ui, typescript:generic_core, copy:generic_core, typescript:chrome, copy:chrome_app, copy:chrome_extension, shell:extract_chrome_tests, copy:firefox, typescript:uistatic, concat:uistatic, copy:uistatic
  • build(unflat): build_chrome, build_firefox, build_uistatic
  • run_uistatic: typescript:generic_ui, sass:generic_ui, copy:generic_ui, typescript:uistatic, concat:uistatic, copy:uistatic, connect:uistatic
  • run_uistatic(unflat): build_uistatic, connect:uistatic
  • everything: shell:bower_install, tsd:refresh, typescript:generic_ui, sass:generic_ui, copy:generic_ui, typescript:generic_core, copy:generic_core, typescript:chrome, copy:chrome_app, copy:chrome_extension, shell:extract_chrome_tests, copy:firefox, typescript:uistatic, concat:uistatic, copy:uistatic, typescript:mocks, jasmine:generic_core, jasmine:generic_ui, typescript:chrome_mocks, jasmine:chrome_extension
  • everything(unflat): setup, tsd:refresh, build, test
  • default: typescript:generic_ui, sass:generic_ui, copy:generic_ui, typescript:generic_core, copy:generic_core, typescript:chrome, copy:chrome_app, copy:chrome_extension, shell:extract_chrome_tests, copy:firefox, typescript:uistatic, concat:uistatic, copy:uistatic
  • default(unflat): build Running "clean:0" (clean) task Cleaning build...OK

Running "clean:1" (clean) task

Running "clean:2" (clean) task

Running "clean:3" (clean) task Cleaning .sass-cache...OK

Running "clean:4" (clean) task Cleaning .grunt...OK

Running "clean:5" (clean) task Cleaning node_modules...OK

Running "clean:6" (clean) task Cleaning test_output...OK

Running "clean:7" (clean) task Cleaning third_party/lib...OK

Done, without errors. mhild-macbookpro:uProxy mhild$ grunt grunt-cli: The grunt command line interface. (v0.1.13)

Fatal error: Unable to find local grunt.

If you're seeing this message, either a Gruntfile wasn't found or grunt hasn't been installed locally to your project. For more information about installing and configuring grunt, please see the Getting Started guide:

http://gruntjs.com/getting-started $

matthild avatar Jul 09 '14 23:07 matthild

Did you follow setup.sh and install grunt-cli globally?

mollyling avatar Jul 16 '14 19:07 mollyling

:+1: grunt clean should only delete compiled/generated files; not the "environment".

trevj avatar Jul 16 '14 19:07 trevj

I can reproduce the problem as follows:

  1. Clone a fresh uProxy repo (git clone [email protected]:uProxy/uProxy.git).
  2. cd uProxy
  3. ./setup.sh
  4. grunt clean
  5. grunt test

Step 5 fails with the "Unable to find local grunt" message.

grunt-cli is installed.

matthild avatar Jul 17 '14 18:07 matthild

I'll submit a fix today. We shouldn't be removing node_modules in the grunt clean task. (see the Gruntfile)

On Thu, Jul 17, 2014 at 2:24 PM, Matt Hildebrand [email protected] wrote:

I can reproduce the problem as follows:

  1. Clone a fresh uProxy repo (git clone [email protected] :uProxy/uProxy.git).
  2. cd uProxy
  3. ./setup.sh
  4. grunt clean
  5. grunt test

Step 5 fails with the "Unable to find local grunt" message.

grunt-cli is installed.

— Reply to this email directly or view it on GitHub https://github.com/uProxy/uProxy/issues/292#issuecomment-49344633.

Lucas Dixon | Google Ideas

iislucas avatar Jul 17 '14 18:07 iislucas

Fixed in https://github.com/uProxy/uProxy/pull/298

On Thu, Jul 17, 2014 at 2:34 PM, Lucas Dixon [email protected] wrote:

I'll submit a fix today. We shouldn't be removing node_modules in the grunt clean task. (see the Gruntfile)

On Thu, Jul 17, 2014 at 2:24 PM, Matt Hildebrand <[email protected]

wrote:

I can reproduce the problem as follows:

  1. Clone a fresh uProxy repo (git clone [email protected] :uProxy/uProxy.git).
  2. cd uProxy
  3. ./setup.sh
  4. grunt clean
  5. grunt test

Step 5 fails with the "Unable to find local grunt" message.

grunt-cli is installed.

— Reply to this email directly or view it on GitHub https://github.com/uProxy/uProxy/issues/292#issuecomment-49344633.

Lucas Dixon | Google Ideas

Lucas Dixon | Google Ideas

iislucas avatar Jul 18 '14 14:07 iislucas