To fork or not to fork

Offen
#91 6 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
25/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Ruhig
Tech-Stack
php
Bereich
backend

Rechercherichtung

Beginne mit src/Lexer.php ungefähr bei Zeile 432 und vergleiche die Verarbeitung von [ ?abc == def ] mit jmespath-community/jmespath.spec, insbesondere JEP-012a. Das Issue benötigt zunächst eine Entscheidung eines Maintainers darüber, ob neuere Community-Spezifikationen übernommen werden sollen oder die Konsistenz mit anderen Implementierungen bewahrt werden soll; erst danach können Abschlusskriterien definiert werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Hey @GrahamCampbell I'm rudely pinging you, I hope you will forgive me.

We've recently switched to the clientside community implementation since the one here is no longer supported.
However we also use this implementation in our backend.

We've found some inconsistencies between the community implementation and the PHP and JS implementations here. In this case the community implementation is correct according to the spec.

My question to you is this: Would you accept PRs that fix spec compliance while breaking consistency with other libraries in this org?

I'd prefer not to fork this to the community org if we can instead maintain it here; on the other hand while you're keeping this alive, it's not being actively developed (no blame, just observation).

What would your preference be? Since we use JMESPath I'm happy to contribute in the form of a fork with the community or by making PRs here; but I'd love your opinion before I make a choice.

The specific issue we're running into is the case of an unquoted string inside a JSON literal:

[?abc == `def`]

Which is supported in this library: https://github.com/jmespath/jmespath.php/blob/master/src/Lexer.php#L432
The fix is easy of course, but we'd break consistency with the JS implementation.

The specification where this is defined lives here: https://github.com/jmespath-community/jmespath.spec/blob/main/jep-012-raw-string-literals.md
Which is obsoleted by 12a: https://github.com/jmespath-community/jmespath.spec/blob/main/jep-012a-raw-string-literals.md

TLDR; would you accept PRs that update this library to newer community specs or do you prefer to keep this implementation consistent with other implementations in this ORG?

Vorherrschende Sprache
PHP
Sterne
2k
Forks
57
Ø Merge
2 Std. 22 Min.
Gemergte PRs (30 T.)
12

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Ähnliche Issues

Weitere Issues zu PHP

Neue Issues direkt in Ihr Postfach

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