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

[BUG] Migration class with docstring fails to execute. #213

Open
jeffscaturro-aka opened this issue Nov 10, 2023 · 0 comments
Open

[BUG] Migration class with docstring fails to execute. #213

jeffscaturro-aka opened this issue Nov 10, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jeffscaturro-aka
Copy link

Describe the bug

If I add a migration file, and then add a docstring to that migration, it fails to run the migration and bombs out with the following error:

Applying local migrations...
-- Conduit CLI Version: 4.4.0
-- Conduit project version: 4.4.0
*** Uncaught error
    RangeError (start): Invalid value: Not in inclusive range 0..281: 499
  **** Stacktrace
  * #0      RangeError.checkValidRange (dart:core/errors.dart:360:7)
  * #1      _StringBase.substring (dart:core-patch/string_patch.dart:398:27)
  * #2      new MigrationSource (package:conduit/src/migration_source.dart:8:28)
  * #3      new MigrationSource.fromFile (package:conduit/src/migration_source.dart:32:12)
  * #4      CLIDatabaseManagingCommand.projectMigrations.<anonymous closure> (package:conduit/src/mixins/database_managing.dart:36:41)
  * #5      MappedIterator.moveNext (dart:_internal/iterable.dart:393:20)
  * #6      new _GrowableList._ofOther (dart:core-patch/growable_array.dart:202:26)
  * #7      new _GrowableList.of (dart:core-patch/growable_array.dart:152:26)
  * #8      new List.of (dart:core-patch/array_patch.dart:47:28)
  * #9      Iterable.toList (dart:core/iterable.dart:495:7)
  * #10     CLIDatabaseManagingCommand.projectMigrations (package:conduit/src/mixins/database_managing.dart:37:12)
  * #11     CLIDatabaseUpgrade.handle (package:conduit/src/commands/db_upgrade.dart:18:24)
  * #12     CLICommand.process (package:conduit/src/command.dart:238:20)
  * <asynchronous suspension>
  * #13     main (file:///Users/jeff/.pub-cache/hosted/pub.dev/conduit-4.4.0/bin/conduit.dart:9:14)
  * <asynchronous suspension>
  ****

To Reproduce
Steps to reproduce the behavior:

  1. Make a change that would result in a migration file being added, or add your own migration file.
  2. Add a docstring to migration class (/// This migration was added because... for class Migration13 extends Migration {).
  3. Run the migrations.
  4. See error.
  5. Remove the docstring from the migration class.
  6. Run the migration.

Expected behavior

I would expect to be able to add a docstring to an added migration.

Screenshots
If applicable, add screenshots to help explain your problem.

System Information:

  • OS: [e.g. iOS] n/a (server)
  • Dart Version: 3.1.0 (stable)
  • Conduit Version: 4.4.0
@jeffscaturro-aka jeffscaturro-aka added the bug Something isn't working label Nov 10, 2023
@j4qfrost j4qfrost self-assigned this Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants