question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrade to version 2.1.0 breaks

See original GitHub issue

Hi,

I was updating the packages from my solution and when upgrading from 2.0.3 to 2.1.0 of your library, all of sudden my screen stopped working.

I had a dynamic form that receives the framework type at the creation of the module and I’m using your library to abstract the dynamic injection of the component

private _collectChangesFromDiffer(differ: any): SimpleChanges {
    const changes = {} as SimpleChanges;

    // It's breaking here! It seems like the differ is null or undefined, causing the loop to break.
    differ.forEachItem((record: KeyValueChangeRecordAny) =>
      changes[record.key] = new CustomSimpleChange(record.previousValue, record.currentValue, false));

    differ.forEachAddedItem((record: KeyValueChangeRecordAny) =>
      changes[record.key].previousValue = UNINITIALIZED);

    return this._resolveChanges(changes);
  }

before (v.2.0.3) :

    if (inputsChanges) {
      const isNotFirstChange = !!this._lastInputChanges;
      this._lastInputChanges = this._collectChangesFromDiffer(inputsChanges);

      if (isNotFirstChange) {
        this.updateInputs();
      }
    }

Current:

    if (inputsChanges) {
      const isNotFirstChange = !!this._lastInputChanges;
      this._updateInputChanges(inputsChanges);

      if (isNotFirstChange) {
        this.updateInputs();
      }
    }

Can you please have a look? It seems the caller of this function changed and something within the new routine is not happy. Possibly due to the fact the _collectChangesFromDiffer() is called twice. One within the ngOnChanges and then on ngOnCheck.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:31 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
lukaszbachmancommented, Apr 11, 2018

@gund , @minuz , sorry guys but I think I might have reported a false issue. Inspired by your questions I reverted my Angular+CLI migration, did it again but this time enforced version 2.0.3 on ng-dynamic-component. I can confirm that this works with:

Angular CLI: 1.7.4
Node: 9.11.1
OS: win32 x64
Angular: 5.2.9

I must have upgraded ng-dynamic-component by mistake when upgating my libs, because I had caret range applied to it: ^2.0.3

You can disregard my previous comments on this issue. Thanks for a brainstorm which helped me to recover from that.

1reaction
st-clair-clarkecommented, Mar 26, 2018

I agree with @minuz. My application is broken as well with the new upgrade. Here is the error from my app

ng-dynamic-error

Note the _collectChangesFromDiffer present in the error and in @minuz.

Also, can we have a change-log please.

Cheers

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading to 2.1.0 breaks template rendering - Drupal
@wells, I upgraded the module yesterday to the latest version 2.1.1, and got WSOD with this error in the logs: Drupal\calendar_link\ ...
Read more >
matplotlib broken after `pip install matplotlib --upgrade` to ...
This is an issue with matplotlib 2.1.0 on macOS. There is a bug which causes this due to some refactoring in the new...
Read more >
Upgrading | Grafana Loki documentation
Upgrading Grafana Loki Every attempt is made to keep Grafana Loki backwards compatible, such that upgrades should be low risk and low friction....
Read more >
Docker Compose release notes
This release reverts the breaking changes introduced in Compose v2.8.0 by compose-go v1.3.0 . Updates . Updated compose-go to v1.4.0 as previous ......
Read more >
Releases | NGINX Ingress Controller
Update NGINX Plus version to R25. Update NGINX version to 1.21.5. HELM CHART: The version of the Helm chart is now 0.12.0. UPGRADE:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found