NativeScript / NativeScript/nativescript-cli

No indenting in console.dir() object dump

Offen
#4,160 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug device logs os: ios
Vorherrschende Sprache
JavaScript
Sterne
1.1k
Forks
204
Ø Merge
1 T. 9 Std.
Gemergte PRs (30 T.)
8

Beschreibung

@aaayushsingh commented on Thu Apr 12 2018

Issue:

There is no indenting in the console.dir object dump on iOS devices. See image below.

I'd like to work on this issue and submit a PR.

screen shot 2018-04-11 at 2 03 34 pm
Version numbers that your issue occurs with:
  • CLI: 4.0.0-2018-04-05-11381
  • Cross-platform modules: 3.4.1
  • Runtime(s): iOS - 4.0.1-rc-2018-04-05-01
  • Plugin(s): NA
Steps to reproduce
  1. create new project with hello world template.
  2. paste this anywhere in the files...
console.dir({
    name1: "value1",
    name2: "value2",
    name3: {
      name3_1: "value3_1",
      name3_2: "value3_2",
      name3_3: {
        name3_3_1: "value",
        name3_3_2: "value"
      }
    }
  });

@mbektchiev commented on Mon Sep 17 2018

Guideline to potential contributors (taken from https://github.com/NativeScript/ios-runtime/issues/875#issuecomment-380392316)

First, you can start with environment setup -> README.md after that you can check the guidelines to follow when contributing - CLA signing, branch management, etc and also read how to connect the local iOS runtime project to a custom {N} project for easier debugging

You can look at the getStringRepresentationOfObject function to implement the fix you suggest.

Hope this will help you to start and soon you will became a part of the the {N} contributors family :)

If you have any questions or face any problems related to the setup or not, feel free to open a new issue so it would be easier to find it and to be resolved (instead of writing here in this issue).


@aaayushsingh commented on Mon Sep 17 2018

I was working on this but there was a commit by someone that appeared to have fixed this issue. I'll get onto this of no-one else is.


@mbektchiev commented on Mon Sep 17 2018

@aaayushsingh, thank you for the willingness to help. We've checked that this still is not fixed, so you can continue with it if you want.


@aaayushsingh commented on Mon Sep 17 2018

sure. I'm on it then


@aaayushsingh commented on Tue Nov 20 2018

I was working on this but there was a commit by someone that appeared to have fixed this issue.

@mbektchiev I can't reproduce this when I add the ios runtime like the readme. That way everything logs fine. This why I thought it was fixed already


@mbektchiev commented on Tue Nov 20 2018

@aaayushsingh I just found out that indeed it's fixed. PR #884 has addressed it. I'm really sorry for misleading you.


@mbektchiev commented on Tue Nov 20 2018

@aaayushsingh Thank you very much for willing to help us. If you feel it suits you, you may work on the other issue that is marked with help wanted. It is suitable for first time committers as well.


@Natalia-Hristova commented on Tue Nov 20 2018

I still reproduce it with CLI: 5.0.0 and ios-runtime: 5.0.0 on simulator and device.


@aaayushsingh commented on Tue Nov 20 2018

@Natalia-Hristova yeah, It is reproducible with NativeScript cli but when I try to reproduce using steps mentioned here in comment by @mbektchiev and run using xcode, the log is indented properly.


@mbektchiev commented on Wed Nov 21 2018

@aaayushsingh @Natalia-Hristova I've tested and can confirm that the iOS Runtime actually indents the output, but it seems like there's some trimming happening in {N} CLI. We will move the issue to the CLI repository. Thank you both for helping clear this out!

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere das verschachtelte console.dir()-Beispiel aus dem Issue mit der NativeScript CLI und vergleiche dessen Ausgabe mit der Ausgabe der iOS-Laufzeitumgebung. Der Thread weist auf das Trimming in der CLI und nicht auf src/NativeScript/inspector/GlobalObjectConsoleClient.cpp hin; verfolge den CLI-Logging-Pfad und bestätige, dass die Einrückung der verschachtelten Ausgaben erhalten bleibt, wenn die Ausgabe korrekt ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.