melos icon indicating copy to clipboard operation
melos copied to clipboard

Melos version null pointer exception

Open SalihCanBinboga opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues.

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

SalihCanBinboga avatar Aug 06 '23 07:08 SalihCanBinboga

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

Yongle-Fu avatar Sep 03 '24 10:09 Yongle-Fu

This should no longer be an issue, please drop a comment if you do still experience this.

spydon avatar Apr 08 '25 14:04 spydon