invertase / melos

🌋 A tool for managing Dart projects with multiple packages. With IntelliJ and Vscode IDE support. Supports automated versioning, changelogs & publishing via Conventional Commits.
https://melos.invertase.dev/~melos-latest
Apache License 2.0
1.19k stars 206 forks source link

Melos version null pointer exception #554

Open SalihCanBinboga opened 1 year ago

SalihCanBinboga commented 1 year ago

Is there an existing issue for this?

Version

3.1.1

Description

When I run the melos version -a command, I get the following error. Additionally, the changelog is not being updated. Note: When I set includeCommitId to 'true', I encounter this error.

Error;

WARNING: Skipping updating dev dependency binboo_lints for package data - the version is a Map definition and is most likely a dependency that is importing from a path or git remote.
WARNING: Skipping updating dev dependency binboo_lints for package domain - the version is a Map definition and is most likely a dependency that is importing from a path or git remote.
WARNING: Skipping updating dev dependency binboo_lints for package client_dashboard - the version is a Map definition and is most likely a dependency that is importing from a path or git remote.
WARNING: Skipping updating dev dependency binboo_lints for package client_onboarding - the version is a Map definition and is most likely a dependency that is importing from a path or git remote.
WARNING: Skipping updating dev dependency binboo_lints for package common_splash - the version is a Map definition and is most likely a dependency that is importing from a path or git remote.
WARNING: Skipping updating dev dependency binboo_lints for package client_discover - the version is a Map definition and is most likely a dependency that is importing from a path or git remote.
WARNING: Skipping updating dev dependency binboo_lints for package client_vehicles_map - the version is a Map definition and is most likely a dependency that is importing from a path or git remote.

Unhandled exception:
Null check operator used on a null value
#0      ChangelogStringBufferExtension.writePackageUpdateChanges (package:melos/src/common/changelog.dart:186:39)
#1      ChangelogStringBufferExtension.writePackageChangelog (package:melos/src/common/changelog.dart:141:7)
#2      MelosChangelog.markdown (package:melos/src/common/changelog.dart:79:29)
#3      Changelog.write (package:melos/src/common/changelog.dart:58:27)
<asynchronous suspension>
#4      _VersionMixin._performPackageUpdates.<anonymous closure> (package:melos/src/commands/version.dart:686:9)
<asynchronous suspension>
#5      _RootZone.bindUnaryCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1633:12)
<asynchronous suspension>

Steps to reproduce

I'm not sure how to reproduce it, but precautions can be taken regarding the null pointer issue

Expected behavior

I expect the version to be incremented appropriately and the relevant changelogs to be added according to my commits.

Screenshots

No response

Additional context and comments

No response

Yongle-Fu commented 2 months ago
melos version -p --no-git-tag-version

melos version
  └> /Users/yongle/project/Flutter/bci_device_sdk

The following 9 packages will be updated:

Package Name          Current Version   Updated Version   Update Reason
bci_device            0.1.5-dev.2       0.1.5-dev.3       updated with minor changes
bci_device_base       0.0.6             0.0.7-dev.0       updated with minor changes
bci_device_nordic     0.1.0             0.1.1-dev.0       updated with minor changes
bci_device_phy_plus   0.0.1             0.0.2-dev.0       updated with minor changes
bci_device_sdk        0.3.0             0.3.1-dev.0       updated with minor changes
libascl               0.1.0             0.1.1-dev.0       updated with minor changes
libcmsn               2.0.0             2.1.0-dev.0       updated with minor changes
liboxyz               1.23.1            1.24.0-dev.0      updated with minor changes
libfusi               1.19.3            1.19.4-dev.0      dependency was updated

✔ Continue? (y/N) ‥ y
Unhandled exception:
Null check operator used on a null value
#0      ChangelogStringBufferExtension.writePackageUpdateChanges (package:melos/src/common/changelog.dart:182:39)
#1      ChangelogStringBufferExtension.writePackageChangelog (package:melos/src/common/changelog.dart:137:7)
#2      MelosChangelog.markdown (package:melos/src/common/changelog.dart:64:29)
#3      Changelog.write (package:melos/src/common/changelog.dart:43:27)
<asynchronous suspension>
#4      _VersionMixin._performPackageUpdates.<anonymous closure> (package:melos/src/commands/version.dart:695:9)
<asynchronous suspension>
#5      Future._kTrue (dart:async/future.dart:650:3)
<asynchronous suspension>
#6      _RootZone.bindUnaryCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1633:12)
<asynchronous suspension>

melos --version 6.1.0