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

Getting stuck during patching #40

Open
tangix opened this issue Jun 11, 2024 · 2 comments
Open

Getting stuck during patching #40

tangix opened this issue Jun 11, 2024 · 2 comments

Comments

@tangix
Copy link

tangix commented Jun 11, 2024

Running latest version but whenever I try to upgrade my CI project 4.4.6 -> 4.5.2, patching seems to stop in the middle of the process so I never get tatter/patches branch. This is the git tree I get after running ./vendor/bin/patch -c 4.4.6 -v 4.5.2:

image

Any ideas?

This is the full log:

╰─ ./vendor/bin/patch -c 4.4.6 -v 4.5.2                                
git version 2.39.3 (Apple Git-146)
Composer version 2.7.6 2024-05-04 23:03:15
PHP version 8.1.28 (/usr/local/bin/php)
Run the "diagnose" command to get more detailed diagnostics output.
************************************
*          CONFIGURATION           *
************************************

Scripts Directory: /Users/msa/Tangix_Work/_virtualtester/backend-services/cswa-report-ci/vendor/tatter/patches/src
Project Directory: /Users/msa/Tangix_Work/_virtualtester/backend-services/cswa-report-ci
Target Version:    4.5.2
Current Version:   4.4.6
Source Package:    codeigniter4/framework
Base Branch:       master
Selected Items:    app/ public/ env spark

************************************
*             STAGING              *
************************************

Switched to a new branch 'tatter/scratch'
rm '.gitignore'
rm '.php-cs-fixer.cache'
rm '.php-cs-fixer.dist.php'
rm 'LICENSE'
rm 'README.md'
rm 'app/.htaccess'
rm 'app/Classes/ReportType.php'
rm 'app/Classes/TeacherSession.php'
rm 'app/Commands/AppEduReport.php'
rm 'app/Commands/EduBaseCommand.php'
rm 'app/Commands/EduReportTraits.php'
rm 'app/Common.php'
rm 'app/Config/App.php'
rm 'app/Config/Autoload.php'
rm 'app/Config/Boot/development.php'
rm 'app/Config/Boot/production.php'
rm 'app/Config/Boot/testing.php'
rm 'app/Config/CURLRequest.php'
rm 'app/Config/Cache.php'
rm 'app/Config/Constants.php'
rm 'app/Config/ContentSecurityPolicy.php'
rm 'app/Config/Cookie.php'
rm 'app/Config/Database.php'
rm 'app/Config/DocTypes.php'
rm 'app/Config/Email.php'
rm 'app/Config/Encryption.php'
rm 'app/Config/Events.php'
rm 'app/Config/Exceptions.php'
rm 'app/Config/Feature.php'
rm 'app/Config/Filters.php'
rm 'app/Config/ForeignCharacters.php'
rm 'app/Config/Format.php'
rm 'app/Config/Generators.php'
rm 'app/Config/Honeypot.php'
rm 'app/Config/Images.php'
rm 'app/Config/Kint.php'
rm 'app/Config/Logger.php'
rm 'app/Config/Migrations.php'
rm 'app/Config/Mimes.php'
rm 'app/Config/Modules.php'
rm 'app/Config/Pager.php'
rm 'app/Config/Paths.php'
rm 'app/Config/Publisher.php'
rm 'app/Config/Routes.php'
rm 'app/Config/Routing.php'
rm 'app/Config/Security.php'
rm 'app/Config/Services.php'
rm 'app/Config/Session.php'
rm 'app/Config/Toolbar.php'
rm 'app/Config/UserAgents.php'
rm 'app/Config/Validation.php'
rm 'app/Config/View.php'
rm 'app/Controllers/BaseController.php'
rm 'app/Controllers/Cswa.php'
rm 'app/Controllers/Home.php'
rm 'app/Database/Migrations/.gitkeep'
rm 'app/Database/Seeds/.gitkeep'
rm 'app/Filters/.gitkeep'
rm 'app/Helpers/.gitkeep'
rm 'app/Language/.gitkeep'
rm 'app/Language/en/Validation.php'
rm 'app/Libraries/.gitkeep'
rm 'app/Libraries/MyValueBinder.php'
rm 'app/Models/.gitkeep'
rm 'app/ThirdParty/.gitkeep'
rm 'app/Views/errors/cli/error_404.php'
rm 'app/Views/errors/cli/error_exception.php'
rm 'app/Views/errors/cli/production.php'
rm 'app/Views/errors/html/debug.css'
rm 'app/Views/errors/html/debug.js'
rm 'app/Views/errors/html/error_404.php'
rm 'app/Views/errors/html/error_exception.php'
rm 'app/Views/errors/html/production.php'
rm 'app/Views/welcome_message.php'
rm 'app/index.html'
rm 'builds'
rm 'composer.json'
rm 'composer.lock'
rm 'env'
rm 'phpunit.xml.dist'
rm 'public/.htaccess'
rm 'public/favicon.ico'
rm 'public/index.php'
rm 'public/robots.txt'
rm 'spark'
rm 'tests/README.md'
rm 'tests/_support/Database/Migrations/2020-02-22-222222_example_migration.php'
rm 'tests/_support/Database/Seeds/ExampleSeeder.php'
rm 'tests/_support/Libraries/ConfigReader.php'
rm 'tests/_support/Models/ExampleModel.php'
rm 'tests/database/ExampleDatabaseTest.php'
rm 'tests/session/ExampleSessionTest.php'
rm 'tests/unit/HealthTest.php'
rm 'utils/PhpCsFixer/CodeIgniter4.php'
rm 'utils/PhpCsFixer/pre-commit'
rm 'writable/.htaccess'
rm 'writable/cache/index.html'
rm 'writable/logs/index.html'
rm 'writable/session/index.html'
rm 'writable/uploads/index.html'
./composer.json has been updated
Running composer update codeigniter4/framework --with-all-dependencies
Loading composer repositories with package information                                                                                                    Updating dependencies                                 
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
64 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Found 1 security vulnerability advisory affecting 1 package.
Run "composer audit" for a full list of advisories.
@kenjis
Copy link
Contributor

kenjis commented Jul 2, 2024

Upgrading from clean v4.4.6 to v4.5.3.

$ vendor/bin/patch -c 4.4.6 -v 4.5.3
git version 2.45.2
Composer version 2.7.7 2024-06-10 22:11:12
PHP version 8.2.20 (/usr/local/Cellar/[email protected]/8.2.20/bin/php)
Run the "diagnose" command to get more detailed diagnostics output.
************************************
*          CONFIGURATION           *
************************************

Scripts Directory: /Users/kenji/work/codeigniter/tmp/ci446/vendor/tatter/patches/src
Project Directory: /Users/kenji/work/codeigniter/tmp/ci446
Target Version:    4.5.3
Current Version:   4.4.6
Source Package:    codeigniter4/framework
Base Branch:       main
Selected Items:    app/ public/ env spark

************************************
*             STAGING              *
************************************

Switched to a new branch 'tatter/scratch'
rm '.gitignore'
rm 'LICENSE'
rm 'README.md'
rm 'app/.htaccess'
rm 'app/Common.php'
rm 'app/Config/App.php'
rm 'app/Config/Autoload.php'
rm 'app/Config/Boot/development.php'
rm 'app/Config/Boot/production.php'
rm 'app/Config/Boot/testing.php'
rm 'app/Config/CURLRequest.php'
rm 'app/Config/Cache.php'
rm 'app/Config/Constants.php'
rm 'app/Config/ContentSecurityPolicy.php'
rm 'app/Config/Cookie.php'
rm 'app/Config/Database.php'
rm 'app/Config/DocTypes.php'
rm 'app/Config/Email.php'
rm 'app/Config/Encryption.php'
rm 'app/Config/Events.php'
rm 'app/Config/Exceptions.php'
rm 'app/Config/Feature.php'
rm 'app/Config/Filters.php'
rm 'app/Config/ForeignCharacters.php'
rm 'app/Config/Format.php'
rm 'app/Config/Generators.php'
rm 'app/Config/Honeypot.php'
rm 'app/Config/Images.php'
rm 'app/Config/Kint.php'
rm 'app/Config/Logger.php'
rm 'app/Config/Migrations.php'
rm 'app/Config/Mimes.php'
rm 'app/Config/Modules.php'
rm 'app/Config/Pager.php'
rm 'app/Config/Paths.php'
rm 'app/Config/Publisher.php'
rm 'app/Config/Routes.php'
rm 'app/Config/Routing.php'
rm 'app/Config/Security.php'
rm 'app/Config/Services.php'
rm 'app/Config/Session.php'
rm 'app/Config/Toolbar.php'
rm 'app/Config/UserAgents.php'
rm 'app/Config/Validation.php'
rm 'app/Config/View.php'
rm 'app/Controllers/BaseController.php'
rm 'app/Controllers/Home.php'
rm 'app/Database/Migrations/.gitkeep'
rm 'app/Database/Seeds/.gitkeep'
rm 'app/Filters/.gitkeep'
rm 'app/Helpers/.gitkeep'
rm 'app/Language/.gitkeep'
rm 'app/Language/en/Validation.php'
rm 'app/Libraries/.gitkeep'
rm 'app/Models/.gitkeep'
rm 'app/ThirdParty/.gitkeep'
rm 'app/Views/errors/cli/error_404.php'
rm 'app/Views/errors/cli/error_exception.php'
rm 'app/Views/errors/cli/production.php'
rm 'app/Views/errors/html/debug.css'
rm 'app/Views/errors/html/debug.js'
rm 'app/Views/errors/html/error_404.php'
rm 'app/Views/errors/html/error_exception.php'
rm 'app/Views/errors/html/production.php'
rm 'app/Views/welcome_message.php'
rm 'app/index.html'
rm 'builds'
rm 'composer.json'
rm 'composer.lock'
rm 'env'
rm 'phpunit.xml.dist'
rm 'preload.php'
rm 'public/.htaccess'
rm 'public/favicon.ico'
rm 'public/index.php'
rm 'public/robots.txt'
rm 'spark'
rm 'tests/README.md'
rm 'tests/_support/Database/Migrations/2020-02-22-222222_example_migration.php'
rm 'tests/_support/Database/Seeds/ExampleSeeder.php'
rm 'tests/_support/Libraries/ConfigReader.php'
rm 'tests/_support/Models/ExampleModel.php'
rm 'tests/database/ExampleDatabaseTest.php'
rm 'tests/session/ExampleSessionTest.php'
rm 'tests/unit/HealthTest.php'
rm 'writable/.htaccess'
rm 'writable/cache/index.html'
rm 'writable/debugbar/.gitkeep'
rm 'writable/logs/index.html'
rm 'writable/session/index.html'
rm 'writable/uploads/index.html'
./composer.json has been updated
Running composer update codeigniter4/framework --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating optimized autoload files
29 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
infection/extension-installer: No extensions found
Found 1 security vulnerability advisory affecting 1 package.
Run "composer audit" for a full list of advisories.
./composer.json has been updated
Running composer update codeigniter4/framework --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 2 updates, 0 removals
  - Upgrading codeigniter4/framework (v4.4.6 => v4.5.3)
  - Upgrading psr/log (1.1.4 => 3.0.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 2 updates, 0 removals
    0 [>---------------------------]    0 [->--------------------------]
  - Upgrading psr/log (1.1.4 => 3.0.0): Extracting archive
  - Upgrading codeigniter4/framework (v4.4.6 => v4.5.3): Extracting archive
 0/2 [>---------------------------]   0%
 1/2 [==============>-------------]  50%
 2/2 [============================] 100%
Generating optimized autoload files
29 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
infection/extension-installer: No extensions found
No security vulnerability advisories found.

[tatter/scratch 7e09327] Patch framework (v4.4.6 => v4.5.3)
 31 files changed, 574 insertions(+), 326 deletions(-)
 create mode 100644 Config/Cors.php
 create mode 100644 Config/Optimize.php
Switched to a new branch 'tatter/patches'
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 0 installs, 2 updates, 0 removals
    0 [>---------------------------]    0 [->--------------------------]
  - Downgrading psr/log (3.0.0 => 1.1.4): Extracting archive
  - Downgrading codeigniter4/framework (v4.5.3 => v4.4.6): Extracting archive
 0/2 [>---------------------------]   0%
 1/2 [==============>-------------]  50%
 2/2 [============================] 100%
Generating optimized autoload files
29 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
************************************
*              MERGING             *
************************************

CONFLICT (file location): Config/Cors.php added in 7e09327 (Patch framework (v4.4.6 => v4.5.3)) inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to app/Config/Cors.php.
CONFLICT (file location): Config/Optimize.php added in 7e09327 (Patch framework (v4.4.6 => v4.5.3)) inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to app/Config/Optimize.php.
error: could not apply 7e09327... Patch framework (v4.4.6 => v4.5.3)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"
On branch tatter/patches
You are currently cherry-picking commit 7e09327.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
        modified:   app/Config/App.php
        modified:   app/Config/Autoload.php
        modified:   app/Config/Boot/production.php
        modified:   app/Config/Cache.php
        modified:   app/Config/ContentSecurityPolicy.php
        modified:   app/Config/Database.php
        modified:   app/Config/Exceptions.php
        modified:   app/Config/Feature.php
        modified:   app/Config/Filters.php
        modified:   app/Config/Format.php
        modified:   app/Config/Generators.php
        modified:   app/Config/Kint.php
        modified:   app/Config/Logger.php
        modified:   app/Config/Mimes.php
        modified:   app/Config/Routing.php
        modified:   app/Config/Security.php
        modified:   app/Config/Session.php
        modified:   app/Config/Toolbar.php
        modified:   app/Config/Validation.php
        modified:   app/Config/View.php
        modified:   app/Controllers/BaseController.php
        modified:   app/Views/errors/cli/error_exception.php
        modified:   app/Views/errors/html/debug.css
        modified:   app/Views/errors/html/error_exception.php
        modified:   app/Views/welcome_message.php
        modified:   env
        modified:   public/.htaccess
        modified:   public/index.php
        modified:   spark

Unmerged paths:
  (use "git add <file>..." to mark resolution)
        added by them:   app/Config/Cors.php
        added by them:   app/Config/Optimize.php


************************************
*            RESOLUTION            *
************************************

Conflicts detected during patch! Follow the git instructions for resolution.
Once resolution is complete your changes will be available on branch tatter/patches
and you should remove the old working branch at tatter/scratch.

@davidk43
Copy link

Same as Tangix above, trying to go: vendor/bin/patch -c 4.4.6 -v 4.5.6. Stops at exactly the same point and stops. In the scratch branch the composer json & lock are awaiting staging. So never get any further to a patch branch.

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

No branches or pull requests

3 participants