codefog / contao-haste

Haste is a collection of tools and classes to ease working with Contao
http://codefog.pl/extension/haste.html
MIT License
42 stars 24 forks source link

composer update on windows #133

Closed zonky2 closed 6 years ago

zonky2 commented 6 years ago

I update C4.4 on Windows with cygwin console (Cmder) but I have a error on haste - a problem with haste or composer-plugin?

Package operations: 0 installs, 2 updates, 0 removals                                                                                                                                
Updates: codefog/contao-haste:4.20.2, metamodels/core:dev-feature/contao4 cba05b0                                                                                                    
Updating Contao sources for codefog/contao-haste                                                                                                                                     

  [RuntimeException]                                                                                                                                                                 
  "C:/laragon/www/my_project/web/system/modules/haste" is not a link to "C:/laragon/www/my_project/web/vendor/codefog/contao-haste" (expected "C:/laragon/www/my_project/web/vendor/code   
  fog/contao-haste" but got "C:/laragon/www/my_project/web/system/modules/haste")                                                                                                      

Exception trace:                                                                                                                                                                     
 () at C:\laragon\www\my_project\web\vendor\contao-community-alliance\composer-plugin\src\Installer\AbstractModuleInstaller.php:547                                                    
 ContaoCommunityAlliance\Composer\Plugin\Installer\AbstractModuleInstaller->canRemoveSymlink() at C:\laragon\www\my_project\web\vendor\contao-community-alliance\composer-plugin\src\In
staller\AbstractModuleInstaller.php:303                                                                                                                                              
 ContaoCommunityAlliance\Composer\Plugin\Installer\AbstractModuleInstaller->removeSymlinks() at C:\laragon\www\my_project\web\vendor\contao-community-alliance\composer-plugin\src\Inst
aller\AbstractModuleInstaller.php:140                                                                                                                                                
 ContaoCommunityAlliance\Composer\Plugin\Installer\AbstractModuleInstaller->update() at phar://C:/laragon/bin/composer/composer.phar/src/Composer/Installer/InstallationManager.php:1
93                                                                                                                                                                                   
 Composer\Installer\InstallationManager->update() at phar://C:/laragon/bin/composer/composer.phar/src/Composer/Installer/InstallationManager.php:160                                 
 Composer\Installer\InstallationManager->execute() at phar://C:/laragon/bin/composer/composer.phar/src/Composer/Installer.php:589                                                    
 Composer\Installer->doInstall() at phar://C:/laragon/bin/composer/composer.phar/src/Composer/Installer.php:228                                                                      
 Composer\Installer->run() at phar://C:/laragon/bin/composer/composer.phar/src/Composer/Command/UpdateCommand.php:161                                                                
 Composer\Command\UpdateCommand->execute() at phar://C:/laragon/bin/composer/composer.phar/vendor/symfony/console/Command/Command.php:242                                            
 Symfony\Component\Console\Command\Command->run() at phar://C:/laragon/bin/composer/composer.phar/vendor/symfony/console/Application.php:843                                         
 Symfony\Component\Console\Application->doRunCommand() at phar://C:/laragon/bin/composer/composer.phar/vendor/symfony/console/Application.php:193                                    
 Symfony\Component\Console\Application->doRun() at phar://C:/laragon/bin/composer/composer.phar/src/Composer/Console/Application.php:251                                             
 Composer\Console\Application->doRun() at phar://C:/laragon/bin/composer/composer.phar/vendor/symfony/console/Application.php:117                                                    
 Symfony\Component\Console\Application->run() at phar://C:/laragon/bin/composer/composer.phar/src/Composer/Console/Application.php:100                                               
 Composer\Console\Application->run() at phar://C:/laragon/bin/composer/composer.phar/bin/composer:59                                                                                 
 require() at C:\laragon\bin\composer\composer.phar:24                                                                                                                               

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dep
endencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [-
-prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...
qzminski commented 6 years ago

I think it's rather the composer plugin bug. @Toflar @aschempp ?

Toflar commented 6 years ago

No idea. It's Windows so I have no clue. But I think someone like @fritzmg would've long noticed if there was an issue on Windows with haste or the plugin, so I don't really think it's a problem with either of them. I rather think it's some OS configuration issue but ¯\(ツ)

fritzmg commented 6 years ago

@zonky2 delete C:/laragon/www/my_project/web/system/modules/haste and run composer update again.

aschempp commented 6 years ago

This likely happened because Haste was manually installed in system/modules/ before the composer installation.

zonky2 commented 6 years ago

@fritzmg I delete haste and run php vendor/bin/contao-console contao:symlinks - this create folder haste with symlink assets, but composer update send the same error - I clear the folder modules and run composer again... and now

Installing Contao sources for codefog/contao-haste
  - Installing codefog/contao-haste (4.20.2): Downloading (100%)
 Extracting archive

hmm...?

@aschempp - no

maybe a Windows Schluckauf ;-)

thx!

fritzmg commented 6 years ago

@zonky2 you were not supposed to delete and then run php vendor/bin/contao-console contao:symlinks, you were supposed to delete the file/folder and then run composer update ;)

aschempp commented 6 years ago

contao:symlinks creates a symlink from system/modules to your web folder, that is not related to the composer plugin.

zonky2 commented 6 years ago

then maybe I don't understand the error message https://github.com/codefog/contao-haste/issues/133#issue-348428010

aschempp commented 6 years ago

Just delete the system/modules/haste directory and run composer update again.