instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
amazon-ion__ion-java__518
amazon-ion/ion-java
518
defect
5391230b196cae20ed62191ef9c45ea28259272b
cc1e4e96d6add3eb490c1d14ba067faede44e776
Removes patch buffer and writes the patch length to the outputStream directly.
*Issue #, if available:* N/A *Description of changes:* This PR introduces an optimization by removing the patch buffer used for storing length data of containers or annotations. The PatchLength and PatchPoint are replaced with the length data. This eliminates the need for writing length data to the patch buffer an...
diff --git a/src/com/amazon/ion/impl/bin/IonRawBinaryWriter.java b/src/com/amazon/ion/impl/bin/IonRawBinaryWriter.java index 2a1923afcf..924ddb7bb3 100644 --- a/src/com/amazon/ion/impl/bin/IonRawBinaryWriter.java +++ b/src/com/amazon/ion/impl/bin/IonRawBinaryWriter.java @@ -308,23 +308,20 @@ private static class PatchP...
3
3
2
[{"id": "G0", "claim": "The comment in addPatchPoint should read '// record the length of the patch' instead of '//record the length will be patched in'.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new static helpers varUIntLength and wri...
null
amazon-ion__ion-java__527
amazon-ion/ion-java
527
defect
fe230c61ec39bc610acf3f90622800ca2d52f2ac
a9da8945fd226a0cfdf5b545d7eb0a9b25dcab25
Removes support for reading decimal values as BigInteger
**Description of changes:** The ability to read decimal values as BigInteger does not appear to be used and is inefficient for decimal values with large exponents. This is more-or-less a copy of #522, except that this is not dependent on any other PRs. _By submitting this pull request, I confirm that my contri...
diff --git a/src/com/amazon/ion/IonReader.java b/src/com/amazon/ion/IonReader.java index f8e678737a..ae22818048 100644 --- a/src/com/amazon/ion/IonReader.java +++ b/src/com/amazon/ion/IonReader.java @@ -320,9 +320,8 @@ public interface IonReader public long longValue(); /** - * Returns the current value...
1
1
0
[{"id": "G0", "claim": "Replace the new try/catch with Assert.fail in testReadingDecimalAsBigInteger with assertThrows(IllegalStateException.class, () -> readBigInteger(\"0.\")) plus the static import of org.junit.jupiter.api.Assertions.assertThrows.", "category": "maintainability", "verdict": "supported", "priority": ...
null
amazon-ion__ion-java__549
amazon-ion/ion-java
549
defect
3804441f7b2c17fa96bcf1e53fbca6352cb1b6d8
ff7dca23554711c139c7ae625bce97d1be65f8ef
Iteratively traverses the document during IonValue.makeReadOnly
*Description of changes:* Applies the iterative technique in #542 to `IonValue.makeReadOnly`. ### Performance Datasets: * entry.ion - 225 KB, containing deeply-nested structs with recurring structure, short- and medium-length strings, and numeric values. * committed.10n - 140 B, single top-level struct with...
diff --git a/src/com/amazon/ion/impl/bin/Symbols.java b/src/com/amazon/ion/impl/bin/Symbols.java index 77540c9ae7..8821a0d387 100644 --- a/src/com/amazon/ion/impl/bin/Symbols.java +++ b/src/com/amazon/ion/impl/bin/Symbols.java @@ -41,6 +41,8 @@ import com.amazon.ion.IonException; import com.amazon.ion.SymbolTable; i...
2
2
1
[{"id": "G0", "claim": "The new iterative makeReadOnlyInternal needs to clear symbol ID values and lock the container itself as well, which the removed IonContainerLite.makeReadOnlyInternal used to do.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "...
null
amazon-ion__ion-java__557
amazon-ion/ion-java
557
defect
3804441f7b2c17fa96bcf1e53fbca6352cb1b6d8
c2e9f4434d8d5c39415af823ffb633940922c869
Makes IonValue.clone iterative and improves clone performance.
*Description of changes:* This PR introduces the concept of "shallow clone" vs. "deep clone". Values of every type have a "shallow clone" implementation. For scalars, shallow clone clones all information about the value. For containers, shallow clone clones the container but not its children. Deep clone is only appl...
diff --git a/src/com/amazon/ion/impl/bin/Symbols.java b/src/com/amazon/ion/impl/bin/Symbols.java index 77540c9ae7..8821a0d387 100644 --- a/src/com/amazon/ion/impl/bin/Symbols.java +++ b/src/com/amazon/ion/impl/bin/Symbols.java @@ -41,6 +41,8 @@ import com.amazon.ion.IonException; import com.amazon.ion.SymbolTable; i...
14
11
2
[{"id": "G0", "claim": "growStack should use Arrays.copyOf(stack, stack.length * 2) instead of manually allocating a new array and copying with System.arraycopy.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "deepClone could use a lot more comme...
null
amazon-ion__ion-java__558
amazon-ion/ion-java
558
defect
3804441f7b2c17fa96bcf1e53fbca6352cb1b6d8
e9653cc8481621c812eeb1c6081900333d25cc4c
Adds a configurable maximum comparison depth to Equivalence.
*Description of changes:* Adds a configurable maximum comparison depth to Equivalence. The default is 1000, which should be ample for existing usages. This change had no observable performance impact in local tests. By submitting this pull request, I confirm that my contribution is made under the terms of the ...
diff --git a/src/com/amazon/ion/impl/bin/Symbols.java b/src/com/amazon/ion/impl/bin/Symbols.java index 77540c9ae7..8821a0d387 100644 --- a/src/com/amazon/ion/impl/bin/Symbols.java +++ b/src/com/amazon/ion/impl/bin/Symbols.java @@ -41,6 +41,8 @@ import com.amazon.ion.IonException; import com.amazon.ion.SymbolTable; i...
2
2
1
[{"id": "G0", "claim": "The comparison depth should be carried as primitive ints passed (and incremented) on the call stack instead of a DepthTracker class with mutable state.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "End users have no clear way to ...
null
amazon-ion__ion-java__570
amazon-ion/ion-java
570
defect
5ac52839c9df5c7c5e3a065f05237696c0946d65
240d0d868b0809e18cc359586630d6ca32d43abc
Fix NPE in IonStructLite.doClone()
**Issue #, if available:** None **Description of changes:** Fixes a NullPointerException that can occur when calling `cloneAndRemove` or `cloneAndRetain` on an empty IonStruct. _By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license._
diff --git a/src/com/amazon/ion/impl/lite/IonStructLite.java b/src/com/amazon/ion/impl/lite/IonStructLite.java index 509460336f..958941c30c 100644 --- a/src/com/amazon/ion/impl/lite/IonStructLite.java +++ b/src/com/amazon/ion/impl/lite/IonStructLite.java @@ -298,6 +298,9 @@ private IonStruct doClone(boolean keep, Strin...
1
1
0
[{"id": "G0", "claim": "Move the new tests out of IonStructLiteTest into StructTest and remove any that only duplicate coverage the existing testCloneAndRemove* tests already provide.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
amazon-ion__ion-java__610
amazon-ion/ion-java
610
defect
3802e57b159a0569a80b45dd60e7f4b4e47eccec
005d57a05afc232a8ef63ef67772d3a8beabe99d
Adds support for FixedInt and FixedUInt in WriteBuffer
**Issue #, if available:** None **Description of changes:** * Adds support for `FixedInt` and `FixedUInt` in `WriteBuffer` * Also updated WristeBufferTest to only use JUnit 5 dependencies instead of a mix * Also added a few more FlexInt and FlexUInt test cases. _By submitting this pull request, I confir...
diff --git a/src/com/amazon/ion/impl/bin/WriteBuffer.java b/src/com/amazon/ion/impl/bin/WriteBuffer.java index f136b3e077..fe06d256b3 100644 --- a/src/com/amazon/ion/impl/bin/WriteBuffer.java +++ b/src/com/amazon/ion/impl/bin/WriteBuffer.java @@ -1359,6 +1359,76 @@ private int writeFlexIntOrUInt(final long value, final...
3
2
1
[{"id": "G0", "claim": "The javadoc close marker and the writeFixedInt signature sit on one line; there is a minor spacing issue to fix.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The unrolled writeFixedIntOrUInt checks all 7 if statements e...
null
amazon-ion__ion-java__618
amazon-ion/ion-java
618
defect
b93951a1c1cee8be8cec350f2a579ac87cf17730
52e428c319bed32f8874a09a49642e4f522e9bda
Adds support for writing binary Ion 1.1 timestamps
**Issue #, if available:** None **Description of changes:** Adds support for writing binary Ion 1.1 timestamps. _By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license._
diff --git a/src/com/amazon/ion/impl/bin/IonEncoder_1_1.java b/src/com/amazon/ion/impl/bin/IonEncoder_1_1.java index cca35421f7..0eba255930 100644 --- a/src/com/amazon/ion/impl/bin/IonEncoder_1_1.java +++ b/src/com/amazon/ion/impl/bin/IonEncoder_1_1.java @@ -1,13 +1,12 @@ package com.amazon.ion.impl.bin; -import com...
4
3
1
[{"id": "G0", "claim": "getDecimalSecond() creates a new BigDecimal on each call; use getZFractionalSecond() instead (noting this also requires a null check), including at the short-form site and below.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": ...
null
amazon-ion__ion-java__637
amazon-ion/ion-java
637
defect
8441b356452423b20f5c73c0fc8cb8c1fa65b78c
0a5552d6fdec4c3872e58db70dfd187a63f17db0
Adds support for text and lob types and some annotations
**Issue #, if available:** None **Description of changes:** Adds functions to write symbols (addressed and inline), strings, blobs, clobs, and annotations that have symbol addresses. _By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license._
diff --git a/src/com/amazon/ion/impl/bin/IonEncoder_1_1.java b/src/com/amazon/ion/impl/bin/IonEncoder_1_1.java index 11218dc8cd..7b1ca9d4b2 100644 --- a/src/com/amazon/ion/impl/bin/IonEncoder_1_1.java +++ b/src/com/amazon/ion/impl/bin/IonEncoder_1_1.java @@ -1,11 +1,15 @@ package com.amazon.ion.impl.bin; import com...
2
2
0
[{"id": "G0", "claim": "In SymbolIdsToLongArray, the '$' prefixes could be replaced with nothing and the input split on spaces so the resulting longs are parsed without needing the temp list.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "For th...
null
amazon-ion__ion-java__641
amazon-ion/ion-java
641
defect
90bcb51dc6a3adf45adaaa56f07ea5e06d99811d
55e3deaf497c4db4af71d5d27b2d32545520ab01
Adds support for reading binary Ion 1.1 nulls, booleans, ints, and floats.
*Description of changes:* Adds support for reading binary Ion 1.1 nulls, booleans, ints, and floats. The trickiest part of this was actually the typed nulls, since they now require looking ahead one byte rather than relying on the type being baked into the precomputed type ID. For convenience and simplicity, we sol...
diff --git a/src/com/amazon/ion/impl/IonCursorBinary.java b/src/com/amazon/ion/impl/IonCursorBinary.java index fe27513c5a..2224d2bc6f 100644 --- a/src/com/amazon/ion/impl/IonCursorBinary.java +++ b/src/com/amazon/ion/impl/IonCursorBinary.java @@ -1262,6 +1262,9 @@ private boolean uncheckedReadHeader(final int typeIdByt...
4
4
2
[{"id": "G0", "claim": "There should be unit test cases for reading variable-length integers as int and long (e.g. \"1, F5 03 01\", \"1, F5 09 01 00 00 00\", \"0, F5 01\").", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reader should be able to read...
null
amazon-ion__ion-java__644
amazon-ion/ion-java
644
defect
b08cbc415fb3f0f57d2ecf6e193b655a0937eb68
69a28ffb00e0b75111232695675ee7ea53bd7e3a
Updates write support for binary Ion 1.1 decimals and timestamps
**Issue #, if available:** https://github.com/amazon-ion/ion-docs/pull/286 **Description of changes:** Updates encoding implementation and tests according to https://github.com/amazon-ion/ion-docs/pull/286 _By submitting this pull request, I confirm that my contribution is made under the terms of the Ap...
diff --git a/src/com/amazon/ion/impl/bin/IonEncoder_1_1.java b/src/com/amazon/ion/impl/bin/IonEncoder_1_1.java index 7b1ca9d4b2..4a7f532b50 100644 --- a/src/com/amazon/ion/impl/bin/IonEncoder_1_1.java +++ b/src/com/amazon/ion/impl/bin/IonEncoder_1_1.java @@ -169,39 +169,36 @@ public static int writeDecimalValue(WriteBu...
1
1
0
[{"id": "G0", "claim": "writeDecimalValue would benefit from not allocating a new byte[] for each decimal coefficient (e.g. via a BigInteger.toBytes scratch-space method or bitLength()/longValue()), and in particular should not call value.unscaledValue().toByteArray() until we know the value isn't 0d0, which will be co...
null
amazon-ion__ion-java__645
amazon-ion/ion-java
645
defect
55e3deaf497c4db4af71d5d27b2d32545520ab01
aeb05f19595d82798833355d0528bb49d6269fb6
Improves the readability of IonTypeID and makes other minor changes to address PR feedback.
*Description of changes:* Addresses feedback left on #639 and #640. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
diff --git a/src/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java b/src/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java index 22eab75be3..161c261b17 100644 --- a/src/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java +++ b/src/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java @@ -376,8 +376,8 ...
2
1
0
[{"id": "G0", "claim": "The new line uses the constant POSITIVE_ZERO_DECIMAL where the replaced line's comment said 'Decimal with negative-zero coefficient', so the naming no longer matches the documented meaning.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G...
null
amazon-ion__ion-java__650
amazon-ion/ion-java
650
defect
0d0258cc546dab0277cbd4be09e0c0f52e724e4f
fa11a5fde5ee93906d9c5903da6801e70dfc1abe
Enable configurable write buffer block size.
*Issue #, if available:* N/A *Description of changes:* This Pull Request introduces a feature that allows users to configure the default block size for the write buffer. Adjusting the block size can lead to performance enhancements by reducing block allocations. To determine the optimal block size for their specif...
diff --git a/src/com/amazon/ion/impl/_Private_IonBinaryWriterBuilder.java b/src/com/amazon/ion/impl/_Private_IonBinaryWriterBuilder.java index 367f37a068..063f4a542c 100644 --- a/src/com/amazon/ion/impl/_Private_IonBinaryWriterBuilder.java +++ b/src/com/amazon/ion/impl/_Private_IonBinaryWriterBuilder.java @@ -223,6 +22...
3
3
2
[{"id": "G0", "claim": "Remove the word \"default\" from the names of the new block-size methods (withDefaultBlockSize/setDefaultBlockSize), since the user is setting the block size and the default block size is 32K.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", ...
null
amazon-ion__ion-java__651
amazon-ion/ion-java
651
defect
fa11a5fde5ee93906d9c5903da6801e70dfc1abe
fa0d461bdef15019160d7d7aab0e50259ecda8ce
Enable auto-flush in ion binary writer.
*Issue #, if available:* N/A *Description of changes:* **Motivation:** This PR introduces an option for users to enable auto-flush while writing a long stream of binary data. Frequent flushing improves performance by releasing memory pressure. This is achieved by preventing the continual allocation of new blocks, w...
diff --git a/src/com/amazon/ion/IonWriter.java b/src/com/amazon/ion/IonWriter.java index 2f0f100247..4efc70e0c4 100644 --- a/src/com/amazon/ion/IonWriter.java +++ b/src/com/amazon/ion/IonWriter.java @@ -126,7 +126,6 @@ public interface IonWriter */ public void flush() throws IOException; - /** *...
8
8
0
[{"id": "G0", "claim": "The new auto-flush fields and getCurrentBuffer should not be public; prefer default (or private where possible) visibility.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a newline before the final constructor paramet...
null
amazon-ion__ion-java__653
amazon-ion/ion-java
653
defect
53ee450ffc4a2598dc763fc423652fdec71202b9
92365d7e009009657ffbc3aa5881d7bf4ce89420
Adds support for reading binary Ion 1.1 decimals.
*Description of changes:* Read Ion 1.1 decimals as BigDecimal or Decimal. Only the latter supports negative zero. The changes to IonTypeID are to comply with https://github.com/amazon-ion/ion-docs/pull/286. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 l...
diff --git a/src/main/java/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java b/src/main/java/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java index 1db18d1e4d..0116687071 100644 --- a/src/main/java/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java +++ b/src/main/java/com/amazon/ion/impl/IonReaderCont...
3
2
0
[{"id": "G0", "claim": "popematt questions whether the readBigDecimal_1_1 method is actually needed, given that Decimal extends BigDecimal (i.e., whether it could be removed in favor of readDecimal_1_1).", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "pre_existing"}, {"id": "G1", "claim": "p...
null
amazon-ion__ion-java__661
amazon-ion/ion-java
661
defect
79c8e5c38020a9d9d0de5665f6717d75aeee12fd
7d04b42d845a9d3930128069e68785758cf762b7
IonRawBinaryWriter_1_1 annotations
**Issue #, if available:** None **Description of changes:** There are two commits in this PR. The first commit refactors some tests. It adds an `autoClose` option to the `assertWriterOutputEquals` function and an `assertWriterThrows` function, and it updates the test cases to use those. The second commit...
diff --git a/src/main/java/com/amazon/ion/impl/IonWriter_1_1.kt b/src/main/java/com/amazon/ion/impl/IonWriter_1_1.kt index f85d526c7f..b83856a42e 100644 --- a/src/main/java/com/amazon/ion/impl/IonWriter_1_1.kt +++ b/src/main/java/com/amazon/ion/impl/IonWriter_1_1.kt @@ -60,10 +60,10 @@ interface IonWriter_1_1 { fu...
5
3
2
[{"id": "G0", "claim": "The 'write three inline annotations' test uses SID arguments where the snapshot S1 hunk shows inline-text arguments are needed (a copy/paste error to fix).", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Additional tests should be...
null
amazon-ion__ion-java__666
amazon-ion/ion-java
666
defect
f74e7e0eab67c209a7ee535f760e5f974ba4d225
b349cf4db5facde841421c4ce93987ce2fbae1a5
Adds support for reading binary Ion 1.1 annotations.
*Description of changes:* This required adding FlexSym support, which is why this PR is bigger than the title might suggest. You'll notice there are some methods that look similar to others, and may be candidates for DRYing up. I'd like to leave that for a future pass where we can set aside the time to analyze the p...
diff --git a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java index 75c0263e48..05fc620865 100644 --- a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java +++ b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java @@ -10,6 +10,7 @@ import com.amazon....
7
5
0
[{"id": "G0", "claim": "The annotation-wrapper opcode comparisons like `valueTid.lowerNibble == 8` should compare the whole type ID byte against a named constant for readability, e.g. `valueTid.byte == OpCode.ANNOTATIONS_TWO_FLEX_SYMS`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope":...
null
amazon-ion__ion-java__668
amazon-ion/ion-java
668
defect
f74e7e0eab67c209a7ee535f760e5f974ba4d225
3ad3cbae790b56974dfeafbb908f196609d1ac92
Adds support for macros to IonRawBinaryWriter_1_1
**Issue #, if available:** None **Description of changes:** Updates the signature of `stepInEExp()` and implements it. There are a couple of incidental changes that I've called out with a 🗺️ comment. ~Potentially controversial... this PR uses the end delimiter to signal the end of a macro's args if that m...
diff --git a/src/main/java/com/amazon/ion/impl/IonWriter_1_1.kt b/src/main/java/com/amazon/ion/impl/IonWriter_1_1.kt index 4309a7f57e..226b7324bf 100644 --- a/src/main/java/com/amazon/ion/impl/IonWriter_1_1.kt +++ b/src/main/java/com/amazon/ion/impl/IonWriter_1_1.kt @@ -128,13 +128,13 @@ interface IonWriter_1_1 { ...
3
1
0
[{"id": "G0", "claim": "The short-length cleanup of the pre-allocated length prefix is skipped for structs that switch to FlexSym after starting, because the writer cannot distinguish a struct that started as FlexSym from one that switched, wasting a byte; the PR leaves this unhandled as a TODO.", "category": "performa...
null
amazon-ion__ion-java__671
amazon-ion/ion-java
671
defect
b349cf4db5facde841421c4ce93987ce2fbae1a5
e10e2f0cd3b78bf4b3377e422dd4abdbdeb03e51
Adds support for reading Ion 1.1 length-prefixed structs.
*Description of changes:* Length-prefixed structs with both SID and VarSym field names. Support for delimited structs will follow in a separate PR. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
diff --git a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java index 05fc620865..9bdbfe9043 100644 --- a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java +++ b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java @@ -207,6 +207,11 @@ private static c...
3
3
1
[{"id": "G0", "claim": "The symbol-zero struct test data misuses the SID/FlexSym encodings: a bare `01` is labeled 'FlexSym SID 0' when the FlexSym encoding of SID 0 is `01 90`, a field name of SID 0 is written in a SID struct without the switch marker to FlexSym encoding, and as a result the test would pass even thoug...
null
amazon-ion__ion-java__675
amazon-ion/ion-java
675
defect
b0d3dcc141774a60705adc2b0bda68026987b17f
a0c28d207d7ceab59a8d7bb1f802f25cff3032c0
Adds the ability to read an Ion int as a Java double, Decimal, or BigDecimal for consistency with the previous implementation.
*Issue #, if available:* Closes #674 Closes #677 *Description of changes:* See the linked issue. Note: I am not changing the documentation or associated error messages to officially endorse doing this. In fact, this would be one of the conversions we'd want to remove as part of #523. For now, we preserve th...
diff --git a/src/main/java/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java b/src/main/java/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java index 811281e64c..830ff047e4 100644 --- a/src/main/java/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java +++ b/src/main/java/com/amazon/ion/impl/IonReaderCont...
3
3
3
[{"id": "G0", "claim": "The author should confirm whether the previous implementation's doubleValue() only worked for Ion ints that fit in a long and, if it worked for larger ints, support converting them as well.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1"...
null
amazon-ion__ion-java__680
amazon-ion/ion-java
680
defect
56bada5253eb7de430315c30e77dda528f65708a
5ae7ba84543a9111e78c2f031c721ae11ff3678e
Handles the case where the reader unexpectedly encounters an oversized value, throwing IonException with a helpful message.
*Description of changes:* Before this change, if the binary reader encountered an oversized value (due to either corruption of the header or an excessively large scalar), and no IonBufferConfiguration had been set, `NullPointerException` would be thrown. After this change, `IonException` is thrown with a helpful mes...
diff --git a/src/main/java/com/amazon/ion/impl/IonReaderContinuableApplicationBinary.java b/src/main/java/com/amazon/ion/impl/IonReaderContinuableApplicationBinary.java index 9fe4e334b8..32b169ffa5 100644 --- a/src/main/java/com/amazon/ion/impl/IonReaderContinuableApplicationBinary.java +++ b/src/main/java/com/amazon/i...
1
1
1
[{"id": "G0", "claim": "Instead of handling a null buffer configuration inline in the reader implementation, the builder should provide a default configuration whose oversized-value handlers throw IonException, so the handling is encapsulated in the builder.", "category": "design", "verdict": "supported", "priority": "...
null
amazon-ion__ion-java__693
amazon-ion/ion-java
693
defect
ebf8f4d933cc85438e1b309bada90ff0d5a76102
0faa4bac087e4c3d9ebb54659a6f1264b10d34ba
Ensures the binary IonReader throws when a value method that returns a primitive type is invoked on a null value.
*Issue #, if available:* #684 (note: this should also be done for the text reader) *Description of changes:* The pre-1.11.0 binary reader would allow this in some cases, returning some form of `0` rather than throwing. If that behavior is desirable in certain applications, those applications should use `IonReader....
diff --git a/src/main/java/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java b/src/main/java/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java index 39813ffd10..df501feb7f 100644 --- a/src/main/java/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java +++ b/src/main/java/com/amazon/ion/impl/IonReaderCont...
1
1
0
[{"id": "G0", "claim": "The test expectAttemptToParseNullScalarAsJavaPrimitiveToFailCleanly, which covers several null types in one method, should be broken up into multiple tests.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
amazon-ion__ion-java__710
amazon-ion/ion-java
710
defect
3c1b6b101aeee8516784d0e4ef941a7523a07087
8b5c43ec46ce79685564b4f2b2690bd8e5b0c4be
Fixes a bug that caused the binary reader not to fail cleanly when parsing incomplete containers in certain cases.
*Issue #, if available:* https://github.com/FasterXML/jackson-dataformats-binary/issues/473 *Description of changes:* Before this fix, the added test `expectIncompleteContainerToFailCleanlyAfterFieldSid` would fail with `ArrayIndexOutOfBoundsException`. The other two tests succeeded before and after the fix; I jus...
diff --git a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java index 43e64748e3..e57123a57f 100644 --- a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java +++ b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java @@ -1568,6 +1568,9 @@ private boolean...
1
1
0
[{"id": "G0", "claim": "The error message would be more accurate if it said the declared length exceeds the number of bytes remaining \"in the container\" rather than \"in the stream\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
amazon-ion__ion-java__769
amazon-ion/ion-java
769
defect
864f351bf7a8851ff264123d59fd52cee6d05c26
fa37dfa70d03a02dabc6797df46351f8d01f34ae
Adds testing of IonValue's multithreaded contract over the 'good' ion-tests files.
*Description of changes:* This is pretty basic for now. We can augment it over time to exercise a wider variety of access patterns. If you have any suggestions, please comment. As proposed, the test randomly chooses a child value of each file to test. Testing every value at every depth would be more robust, but is ...
diff --git a/src/test/java/com/amazon/ion/GoodIonMultithreadedTest.java b/src/test/java/com/amazon/ion/GoodIonMultithreadedTest.java new file mode 100644 index 0000000000..547578bf0b --- /dev/null +++ b/src/test/java/com/amazon/ion/GoodIonMultithreadedTest.java @@ -0,0 +1,181 @@ +package com.amazon.ion; + +import com.a...
1
1
0
[{"id": "G0", "claim": "The class-level Javadoc should gain a summary explaining the test's random-input and concurrent design (what it picks, what it does concurrently, what it asserts, and why full coverage is left to periodic suites).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": ...
null
amazon-ion__ion-java__784
amazon-ion/ion-java
784
defect
f807803916a24bd7c3bea20f10d599d8cf5495af
b747ee82d9fec3abd90da57c6500ef70ff3fabf4
Adds a configurable limit to the number of timestamp fractional second digits that are written to text representations.
*Description of changes:* The Timestamp class holds fractional precision in a BigDecimal, where in many cases that precision can be compactly conveyed (e.g. `0d-1000000`, which is a tuple of `(0, 1000000)`). In text, all those digits must be written explicitly. To avoid attempting to write an excessive number of digit...
diff --git a/src/main/java/com/amazon/ion/Timestamp.java b/src/main/java/com/amazon/ion/Timestamp.java index 3ecb91baa3..63fb8c6269 100644 --- a/src/main/java/com/amazon/ion/Timestamp.java +++ b/src/main/java/com/amazon/ion/Timestamp.java @@ -19,6 +19,7 @@ import static com.amazon.ion.util.IonTextUtils.printCodePointA...
2
1
0
[{"id": "G0", "claim": "The Java trampoline class _Private_Trampoline should be rewritten in Kotlin as an internal function instead of being a public Java class.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "One or two more test cases should be added to...
null
amazon-ion__ion-java__803
amazon-ion/ion-java
803
defect
2d724158037141114810053b0a99bb6cb7633e99
fdf9ee501af5b98792ea94b843bb579b49dab854
Ensures that using a cursor after close has no effect.
*Description of changes:* The `IonCursor` interface extends `Closeable`, which includes documentation on `close` that states that calling `close` after the resource is already closed has no effect. We do not define the behavior of the cursor when methods other than `close` are called after the cursor is closed, but ...
diff --git a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java index 52401ae300..7e94446b81 100644 --- a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java +++ b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java @@ -132,6 +132,11 @@ private static c...
2
2
1
[{"id": "G0", "claim": "The TERMINATED_STATE dummy state should be pre-populated with a state of TERMINATED (via the suggested static initializer) rather than left with the default.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The assignment isSlowMode...
null
amazon-ion__ion-java__823
amazon-ion/ion-java
823
defect
ee9c43ff453a0323c14e3189b5871a02e9d6b201
a12af94d0acd05f2fadd207e501de7cd2fbe6ab9
Adds the IonEncodingVersion pseudo-enum and IonBinaryWriterBuilder_1_1 interface.
*Description of changes:* The existing binary writer structure is complicated and confusing. Rather than attempting to further extend that, I propose a new builder interface for Ion 1.1 that mimics method signatures available on the 1.0 writer builder. For now I've chosen to include only the configuration options th...
diff --git a/src/main/java/com/amazon/ion/IonEncodingVersion.java b/src/main/java/com/amazon/ion/IonEncodingVersion.java new file mode 100644 index 0000000000..0d08dd6005 --- /dev/null +++ b/src/main/java/com/amazon/ion/IonEncodingVersion.java @@ -0,0 +1,60 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Right...
2
1
0
[{"id": "G0", "claim": "The unified test base class should get explanatory comments about what can and cannot be tested there, even though the builders themselves are split between Ion 1.0 and 1.1.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Co...
null
amazon-ion__ion-java__844
amazon-ion/ion-java
844
defect
a7a1f9f6ca40d680eeb4c24159065aca19261353
8097f3c8cb7ca525a1ed76f4101cb79409cd7631
Fixes Ion 1.1 symbols for opcodes E1-E3
**Issue #, if available:** None **Description of changes:** Prior to this change, Op codes E1 - E3 were being handled incorrectly because of several problems: * Ion 1.0 and Ion 1.1 symbol values with SIDs were both being treated as if they were encoded as a (big endian, Ion 1.0) UInts. * `IonReaderContinuab...
diff --git a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java index 1f09e7d14..7f0f999d8 100644 --- a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java +++ b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java @@ -1050,6 +1050,27 @@ private long unc...
4
4
1
[{"id": "G0", "claim": "In slowReadLengthOfFlexUInt_1_1 the call should be fillAt(position, 1) rather than fillAt(position, 0), so that the byte at `position` itself is ensured to be available before it is read.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", ...
null
amazon-ion__ion-java__859
amazon-ion/ion-java
859
defect
9b17d94b3c9d4283a3f31c30d8c3dbc83ab6796f
3110740ac465b1736009cc2407b6c84e4983662c
Fix leaking field name text in IonCursorBinary
**Issue #, if available:** None **Description of changes:** There is a bug that I discovered where Ion 1.1 binary data such as `E0 01 01 EA FD 0F 01 FF 61 D3 09 A1 62` (equivalent to `$ion_1_1 {a:{$4:b}}`) is interpreted incorrectly. The field _text_ from `a` was not properly being reset and was leaking into t...
diff --git a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java index b831f1f86..1add3a718 100644 --- a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java +++ b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java @@ -1841,13 +1841,19 @@ private boolean...
1
1
1
[{"id": "G0", "claim": "The `annotationTokenMarkers.clear()` added to `reset()` appears unnecessary (the `hasAnnotations` boolean already gates the public annotation getters, and the map is cleared before new annotations are read) and hurts performance in this hot method, so it should be removed to keep `reset()` surgi...
null
amazon-ion__ion-java__86
amazon-ion/ion-java
86
defect
e7afa43de0f5c7f0dbb71f04471389ee20f2a4ac
39b87175953a35fea0f0ad71c68722def80b9344
Added getIntegerType API to IonReader and IonInt.
The changes in AbstractIonWriter show how this can be useful. Whereas previously Ion ints were all resurrected as BigIntegers for safety, they can now be resurrected into the smallest possible integer data type. See #76
diff --git a/src/software/amazon/ion/IntegerType.java b/src/software/amazon/ion/IntegerType.java new file mode 100644 index 0000000000..7fb8f17e83 --- /dev/null +++ b/src/software/amazon/ion/IntegerType.java @@ -0,0 +1,34 @@ +// Copyright (c) 2016 Amazon.com, Inc. All rights reserved. + +package software.amazon.ion; +...
18
12
2
[{"id": "G0", "claim": "The new getIntegerType() API should not signal a non-int current value with both IntegerType.NONE and a null return — it should use one or the other, and the reviewers favor dropping NONE and returning null.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}...
null
amazon-ion__ion-java__860
amazon-ion/ion-java
860
defect
4a97f72bc498babf1840a8412edd81dd2053e5ca
20461ea41049ab3afa7e5ab94aa9b88ad88419ca
Adds support for Ion 1.1 inline symbols to the system-level binary reader.
*Description of changes:* This requires checking with the "core" reader whether a symbol token was encoded as a SID or with inline text. Note: the system reader is not considered to be performance-critical. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 l...
diff --git a/src/main/java/com/amazon/ion/impl/IonReaderContinuableCore.java b/src/main/java/com/amazon/ion/impl/IonReaderContinuableCore.java index c6866e449..627829ce9 100644 --- a/src/main/java/com/amazon/ion/impl/IonReaderContinuableCore.java +++ b/src/main/java/com/amazon/ion/impl/IonReaderContinuableCore.java @@ ...
3
1
0
[{"id": "G0", "claim": "The relationship between symbolValueId() and hasSymbolText() (and likewise getFieldId()/hasFieldText()) should be documented, e.g. whether a negative SID always implies text is available.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1"...
null
amazon-ion__ion-java__868
amazon-ion/ion-java
868
defect
2a09b715c7851fd74a05d3874c5b0afc15db0c87
eb193f0b3a210a00e6cdee4ab29b159ce89e9bd5
Fixes various bugs in Ion 1.1 binary parsing
*Issue #, if available:* Fixes #866 *Description of changes:* * Un-disables inline symbols / delimited containers tests in `Ion_1_1_RoundTripTest`. Fixes bugs uncovered due to the increased coverage. * Adds support for reading symbol tables with inline system symbols (#866) * Adds coverage of edge cases address...
diff --git a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java index 3197fcefe..be11ccee1 100644 --- a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java +++ b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java @@ -129,15 +129,6 @@ private static cla...
3
3
0
[{"id": "G0", "claim": "Put each UTF-8 constant's declaration and initialization on one line to reduce the total number of lines, as shown in the suggestion block.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a TODO to see whether copying ...
null
amazon-ion__ion-java__887
amazon-ion/ion-java
887
defect
d1035479c6b8cb01735d4e14c4ff8828c7721f0b
c873a7f8ecbca9c53ccf04813052fd39ff3fa13a
Adds runner for Ion conformance tests
**Issue #, if available:** #748 **Description of changes:** * Adds an interpreter for the conformance DSL * Makes `FakeSymbolToken` implement `_Private_SymbolToken` so that we can be sure that `FakeSymbolToken` will work everywhere we need it to. * Fixes a bug in `_Private_IonTextWriterBuilder_1_1` _By ...
diff --git a/build.gradle.kts b/build.gradle.kts index 654377445c..4887b323da 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -79,6 +79,11 @@ dependencies { testImplementation("org.hamcrest:hamcrest:2.2") testImplementation("pl.pragmatists:JUnitParams:1.1.1") testImplementation("com.google.code.t...
7
7
0
[{"id": "G0", "claim": "IonElement can't load `$0`, which is why those conformance tests are skipped; the real TODO is to make IonElement capable of loading `$0` (not to switch `produces` to IonValue).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add d...
null
amazon-ion__ion-java__891
amazon-ion/ion-java
891
defect
d1035479c6b8cb01735d4e14c4ff8828c7721f0b
9a4b9709edd047e95b2c6b4993c780def707d384
Fixes incremental reading of FlexSyms.
*Description of changes:* Before this PR, FlexSyms could not be read incrementally (i.e., without all bytes available up front) because the relevant methods did not distinguish between the signed integer value `-1` and the `-1` commonly used to convey that the end of the input has been reached. This PR fixes that defe...
diff --git a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java index be11ccee1..09aa55c8c 100644 --- a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java +++ b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java @@ -22,8 +22,10 @@ import static com.a...
1
1
0
[{"id": "G0", "claim": "The commented-out line `//assertNotNull(cursor.fieldTextMarker.typeId);` in the new fieldNameText test helper should be either uncommented or removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
amazon-ion__ion-java__895
amazon-ion/ion-java
895
defect
d1035479c6b8cb01735d4e14c4ff8828c7721f0b
33d8fcb26e3e56c5643347864ec3edd7efd8ee69
Adds PresenceBitmap
**Issue #, if available:** This relates to #741 and #742 **Description of changes:** Adds a class to help manage presence bitmaps for binary E-Expressions. In doing so, I also made these incidental changes: * Extract some FixedInt functionality to a `FixedInt` class (actually a singleton with static method...
diff --git a/src/main/java/com/amazon/ion/impl/bin/FixedInt.kt b/src/main/java/com/amazon/ion/impl/bin/FixedInt.kt new file mode 100644 index 000000000..1052cd5d8 --- /dev/null +++ b/src/main/java/com/amazon/ion/impl/bin/FixedInt.kt @@ -0,0 +1,68 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved....
8
7
2
[{"id": "G0", "claim": "validate() may be performance-sensitive, so iterating the signature directly instead of repetitively calling get(i) would likely be more efficient, as it could skip the work get(i) does each time.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id...
null
amazon-ion__ion-java__905
amazon-ion/ion-java
905
defect
62f97c18b43d08bbf0d47adeb1931d10fc1aa805
92c53880585166a9f38155688f742b59275474a4
Restores float <-> decimal conversions in the binary reader
While the documentation for `IonReader#doubleValue` and `decimalValue` indicates that those methods will throw an exception when then the current value's `IonType` is not `FLOAT` or `DECIMAL` respectively, versions of `ion-java` up to and including v1.10.5 would quietly coerce numeric values to the requested type. The ...
diff --git a/build.gradle.kts b/build.gradle.kts index 98bd83ff6..614495f46 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -90,7 +90,7 @@ val githubRepositoryUrl = "https://github.com/amazon-ion/ion-java/" val isReleaseVersion: Boolean = !version.toString().endsWith("SNAPSHOT") // The name we're checking for...
2
2
0
[{"id": "G0", "claim": "The indentation of the new FLOAT branch in bigDecimalValue() is off, its body lines being indented one level too deep.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The binaryData array initializer in the new test should...
null
amazon-ion__ion-java__910
amazon-ion/ion-java
910
defect
f3b81480cbdd378d762990edcf3bdfbc6988be62
0a9e4266a61e8a6a2d7cf2086054608405d6144b
Adds support for parsing binary argument groups.
*Description of changes:* Implements the low-level parsing of binary argument groups according to the following spec: > **Argument group encoding for tagged encodings** > FlexUInt 0: Delimited > 1..N: Size in bytes = N > Empty tagged argument groups must use bitmap 00 (or delimited start/end, but ...
diff --git a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java index 58ef574e9..757477665 100644 --- a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java +++ b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java @@ -176,6 +176,32 @@ private static cla...
4
2
0
[{"id": "G0", "claim": "The new argumentGroupStack appears to duplicate the existing _Private_RecyclingStack, and the reviewer asks whether any performance difference between the two approaches was observed.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "c...
null
amazon-ion__ion-java__937
amazon-ion/ion-java
937
defect
cc4cf2cda92be0cd78758929a4a79df3c00e312a
8418f16f0512eb04990b658e1b5a9271b08db1c1
Remove MacroRef from user-facing APIs
**Issue #, if available:** Follow up to https://github.com/amazon-ion/ion-java/pull/934#discussion_r1747577719 **Description of changes:** Removes `MacroRef` from the `Expression` model and the macro writer APIs so that we don't have to deal with potentially stale references, and so that we can automatically a...
diff --git a/src/main/java/com/amazon/ion/MacroAwareIonWriter.kt b/src/main/java/com/amazon/ion/MacroAwareIonWriter.kt index 427ab7d5e..e6610b016 100644 --- a/src/main/java/com/amazon/ion/MacroAwareIonWriter.kt +++ b/src/main/java/com/amazon/ion/MacroAwareIonWriter.kt @@ -8,28 +8,20 @@ import com.amazon.ion.impl.macro....
1
1
0
[{"id": "G0", "claim": "tgregg asks whether the comment claiming a low name-conflict risk 'by using the qualified class name' is no longer accurate, given that MACRO_NAME is derived from the simple class name.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
amazon-ion__ion-java__939
amazon-ion/ion-java
939
defect
047e37a9d630b929380ea45b92e5b340914a3ff6
de8d91f23a9a6fbdea03334f30bc819deca1fa0f
Adds Ion 1.1 system symbols
**Issue #, if available:** None. **Description of changes:** This adds an implementation of Ion 1.1 Symbols. Rather than try to kludge them into the existing `SymbolToken` interface, my plan is to treat them like a special case of symbols with inline text. Also updates OpCode `0xEE` to mean "system symbol" ...
diff --git a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java index ad6b2ff34..7c7a833a2 100644 --- a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java +++ b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java @@ -2284,8 +2284,8 @@ private void setU...
3
3
1
[{"id": "G0", "claim": "The reserved opcodes 0x8D-0x8F should also be included in the list checked by isValid_1_1, like the reserved 0xF4 that this change removed from it.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "E_EXPRESSION_FLEX_UINT should ...
null
amazon-ion__ion-java__944
amazon-ion/ion-java
944
defect
4b373e56313bd30eac495bd7971eebe8cce06e36
6317ba466e99d24e785b5fb9fe7755c3b82e8ee2
Adds read support for Ion 1.1 system symbols
**Issue #, if available:** None. **Description of changes:** * Adds support for reading system symbols in FlexSyms and using the `EE` op code. * Changes a lot of tests from using `A0` for "unknown symbol" to `60` and `90` for empty symbol to `75`. * Removes the `@Disabled` annotation from disabled tests in `...
diff --git a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java index 7c7a833a2..2dd72c1b5 100644 --- a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java +++ b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java @@ -22,10 +22,13 @@ import static com....
7
5
1
[{"id": "G0", "claim": "The commented-out length validation in SYSTEM_SYMBOL_ID.typeIdFor should be either un-commented or removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The FlexSym system-symbol check should mask the byte with the SING...
null
amazon-ion__ion-java__947
amazon-ion/ion-java
947
defect
c5562bf5c358a0780abf54c46bf86062089be82f
2ffb79dcf1d33c4f0e3cea0c9a3f0ebae1b00e8a
Adds support for reading Ion 1.1 text syntax for e-expressions and expression groups.
*Description of changes:* See the added tests for examples. There's more to do to support Ion 1.1 text syntax, but this PR allows the text reader to recognize the proposed syntax for e-expressions and expression groups (as I understand it -- see https://github.com/amazon-ion/ion-docs/issues/344#issuecomment-23837174...
diff --git a/src/main/java/com/amazon/ion/impl/IonReaderTextRawTokensX.java b/src/main/java/com/amazon/ion/impl/IonReaderTextRawTokensX.java index 5a2f89ba8..2e9726874 100644 --- a/src/main/java/com/amazon/ion/impl/IonReaderTextRawTokensX.java +++ b/src/main/java/com/amazon/ion/impl/IonReaderTextRawTokensX.java @@ -556...
7
7
1
[{"id": "G0", "claim": "Add a short comment explaining what the new '.'/'..' tokenizing block in IonReaderTextRawTokensX.nextToken is doing.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add comments or slightly more descriptive test names making...
null
amazon-ion__ion-java__951
amazon-ion/ion-java
951
defect
492323f9dc5134c34d2091f6f6224e6fa8b3cd9e
2b260b8ae1b0a730cab868b69f8844419b90d555
Updates TDL syntax for macro invocations, expr groups, and variable expansions
**Issue #, if available:** https://github.com/amazon-ion/ion-docs/issues/343 https://github.com/amazon-ion/ion-docs/issues/344 **Description of changes:** This updates `ion-java` to use the TDL syntax proposed in the above issues. (But this PR does not include updating the E-Expression syntax for expression g...
diff --git a/src/main/java/com/amazon/ion/impl/IonRawTextWriter_1_1.kt b/src/main/java/com/amazon/ion/impl/IonRawTextWriter_1_1.kt index 040e53986..bc3f1e4ae 100644 --- a/src/main/java/com/amazon/ion/impl/IonRawTextWriter_1_1.kt +++ b/src/main/java/com/amazon/ion/impl/IonRawTextWriter_1_1.kt @@ -327,7 +327,11 @@ class ...
2
1
0
[{"id": "G0", "claim": "The reviewer asks what the added note-to-self javadoc line (\"Don't attempt fix this without ensuring that MacroCompilerTest and IonManagesWriter_1_1_Test are working first.\") means, flagging it as unclear.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "intro...
null
amazon-ion__ion-java__954
amazon-ion/ion-java
954
defect
fc8f49e6c03a1cae51f2c29ca63d643c7b81274c
6b84798b56723b24244b458cd5a2f1a411532245
Adds support for parsing Ion 1.1 encoding directives in the text reader.
*Description of changes:* Macro evaluation in Ion text will come in a future PR. At that point, all tests in `EncodingDirectiveCompilationTest` will be parameterized to exercise both binary and text. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license....
diff --git a/src/main/java/com/amazon/ion/impl/IonRawTextWriter_1_1.kt b/src/main/java/com/amazon/ion/impl/IonRawTextWriter_1_1.kt index bc3f1e4ae..12aaed0f1 100644 --- a/src/main/java/com/amazon/ion/impl/IonRawTextWriter_1_1.kt +++ b/src/main/java/com/amazon/ion/impl/IonRawTextWriter_1_1.kt @@ -4,8 +4,12 @@ package co...
2
2
0
[{"id": "G0", "claim": "The new EncodingDirectiveReader should probably be located at com.amazon.ion.impl rather than com.amazon.ion.impl.macro.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "A comment should be added documenting the potential reusabilit...
null
amazon-ion__ion-java__961
amazon-ion/ion-java
961
defect
36d63da7718439aa8b905856bf67133b647420c8
efe7a3a7bb39157ea42402a0fe0af32e172adbd4
Add support for reading system e-expressions
**Issue #, if available:** #741 **Description of changes:** Adds support for reading the System EExpression op-code. In the process, I discovered two issues that seem like they are not caused by my changes. I tried to create an equivalent test using non-system macros to determine whether these issues alrea...
diff --git a/src/main/java/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java b/src/main/java/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java index ca0297801..7fcf19e4a 100644 --- a/src/main/java/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java +++ b/src/main/java/com/amazon/ion/impl/IonReaderContin...
3
1
0
[{"id": "G0", "claim": "The reviewer asks whether the comments reading \"(:values 0 1)\" for the length-prefixed and delimited expression group cases are right and suggests they should read \"(:values (:: 0 1))\".", "category": "documentation", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G...
null
amazon-ion__ion-java__968
amazon-ion/ion-java
968
defect
f7c5a43d772688ab2c228552454060765ae5a6d8
344cf957dbd30020f0526ad386764ca1dbfded4d
Adds support for reading text Ion 1.1 system macros and implicit rest parameters.
*Description of changes:* I wanted to verify #962 works properly for text too, and in adding those tests I found missing support for system macro invocations and implicit rest parameters, added here. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
diff --git a/src/main/java/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java b/src/main/java/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java index 6d6606338..2ac8f2ab1 100644 --- a/src/main/java/com/amazon/ion/impl/IonReaderContinuableCoreBinary.java +++ b/src/main/java/com/amazon/ion/impl/IonReaderContin...
4
3
0
[{"id": "G0", "claim": "In loadMacro, the assignment to macro should be split out of the if condition onto its own line for readability.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "If invoking system macros by numeric address is in scope, a t...
null
amazon-ion__ion-java__976
amazon-ion/ion-java
976
defect
d402b46889ba0db3aa0403cbea065781bc749463
bf2951e8cbc103366f55b153041059c70c39bbe4
Allows readers to interpret macro invocations as encoding directives.
*Description of changes:* Builds on #973 to allow the readers to correctly interpret the `set_macros`, `add_macros`, `set_symbols`, and `add_symbols` system macros as encoding directives. As noted in the JavaDoc atop the EncodingDirectiveReader class, this PR includes some duplication between the top-level `Encodi...
diff --git a/src/main/java/com/amazon/ion/impl/EncodingDirectiveReader.kt b/src/main/java/com/amazon/ion/impl/EncodingDirectiveReader.kt index fbd104f34..1907c5a30 100644 --- a/src/main/java/com/amazon/ion/impl/EncodingDirectiveReader.kt +++ b/src/main/java/com/amazon/ion/impl/EncodingDirectiveReader.kt @@ -22,8 +22,11...
2
2
0
[{"id": "G0", "claim": "Asks whether this handles non-append macro table concatenations, e.g. (macro_table (macro pi () 3.14159) $ion_encoding) inside a $ion_encoding::(...) directive.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The 'SymbolTableA...
null
amazon-ion__ion-rust__217
amazon-ion/ion-rust
217
defect
f2f8a34ea362c61112f8bc534a1d09f8620f6c55
693ffa598ec5ff40fbb7d9b9dfd7ed387bfad543
Adds `ion-tests` test file integration for `Loader`.
* Adds `test-generator` create dev dependency to get test per file. * Adds a test suite with `good`/`bad` files with skip lists. - `equivs` and `non-equivs` are also supported with `embedded_document` parsing. * Adds `Loader::load_all` convenience method. * Adds doc test example in `loader` module docs and f...
diff --git a/Cargo.toml b/Cargo.toml index 11e7b169f..6f2aecde1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,6 +44,7 @@ ion-c-sys = { path = "./ion-c-sys", version = "0.4" } [dev-dependencies] # Used by ion-tests integration walkdir = "^2.3" +test-generator = "0.3" [profile.release] lto = true diff --git a/sr...
4
3
0
[{"id": "G0", "claim": "The test-generator crate does not support `#[ignore]`, so individual ion-tests files cannot be marked ignored, and it might be worth forking the crate to get that functionality.", "category": "testing", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The ...
null
amazon-ion__ion-rust__227
amazon-ion/ion-rust
227
defect
18fe3ec7b44f606448b2a530fa3164e8ed41f225
1be738c4e01310105a6faf6ec6a1c98d4b47f17c
Ion hash test
This commit starts to wire up the ion-hash-test submodule with a runner test file. Work in progress! By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
diff --git a/.gitmodules b/.gitmodules index 57b0012e2..c82fa3772 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "ionc"] path = ion-c-sys/ion-c url = https://github.com/amzn/ion-c +[submodule "ion-hash-test"] + path = ion-hash/ion-hash-test + url = https://github.com/amzn/ion-hash-test.git d...
8
5
0
[{"id": "G0", "claim": "The test coverage is incomplete: not all recorded update and digest values are checked against expectations.", "category": "testing", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new IonHashDigest trait should carry a doc comment clue explaining wh...
null
amazon-ion__ion-rust__237
amazon-ion/ion-rust
237
defect
b838aa2136c48a99bdc0cb6302dbfa0c759bf507
c3fd40272ddd696fece4c4869c5bc699675120ae
Adds the `Dumper` API.
Provides a fixed buffer output implementation using `ion-c-sys`. This implementation uses very specific `unsafe` code to return the written data as an output slice. It has to do this because `IonCWriterHandle` borrows the input slice to write *implicitly*, though the lifetime is tracked through the wrapper. * A...
diff --git a/src/lib.rs b/src/lib.rs index bb6753b98..648453fe3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,18 @@ #![allow(dead_code)] +/// A [`try`]-like macro to workaround the [`Option`]/[`Result`] nested APIs. +/// These API require checking the type and then calling the appropriate getter function +/// ...
13
10
0
[{"id": "G0", "claim": "The result type of `Dumper::write` should be an associated type that each impl can choose for itself, so an impl could for example report the number of bytes written.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `write_all` ...
null
amazon-ion__ion-rust__239
amazon-ion/ion-rust
239
defect
b838aa2136c48a99bdc0cb6302dbfa0c759bf507
8c6bea3e07b4e4c8d38163749fbc3f61d22c7508
changed PartialEq for struct for symmetry bug
*Issue #216 * *Description of changes:* This PR works on solving the issue with symmetry in `Struct` of `Value` API. *Changes:* - Added length check in the `PartialEq` of `...Struct` for symmetry. *Tests:* Added unittests for different length structs in `Value` API.
diff --git a/src/value/borrowed.rs b/src/value/borrowed.rs index 69da2d1e4..f11acea3c 100644 --- a/src/value/borrowed.rs +++ b/src/value/borrowed.rs @@ -363,7 +363,8 @@ impl<'val> PartialEq for BorrowedStruct<'val> { .iter() .find(|(other_k, other_v)| my_k == other_k && my_v == other_v...
4
3
0
[{"id": "G0", "claim": "In BorrowedStruct and OwnedStruct eq, front load the length conditionals so the comparison fails fast when the lengths don't line up.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Stop overloading the `..._element_accessors`...
null
amazon-ion__ion-rust__268
amazon-ion/ion-rust
268
defect
8040a3977adbf8bf78720ae3a0415bb64b93dca5
7260be1ae45472885e741184be0bd40b8013b5df
Rework ion-hash representations
Before this commit, every `Element` visited during ion hash computation would need to allocate a vector: because each element type can be represented by a variable number of bytes! For example, a boolean has no representation while a string is representated by its UTF8 bytes. This commit fixes that by having the ...
diff --git a/ion-hash/src/lib.rs b/ion-hash/src/lib.rs index ae07aa11b..2961cd274 100644 --- a/ion-hash/src/lib.rs +++ b/ion-hash/src/lib.rs @@ -16,7 +16,7 @@ //! # } //! ``` -use digest::{Digest, Output}; +use digest::{Digest, FixedOutput, Output, Reset, Update}; use ion_rs::result::IonResult; use ion_rs::{value...
6
3
0
[{"id": "G0", "claim": "The doc comment on IonHasher mischaracterizes how the Digest subtrait bounds relate to Digest, and the reviewer proposed replacement wording via a suggestion block.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reviewe...
null
amazon-ion__ion-rust__377
amazon-ion/ion-rust
377
defect
70682fcf4df7c36e71813aca215dde6811cc4b26
ad47daba18222af47fab4fd8ef71b42fa83a0867
Fixes more ion-tests for `NativeReader`
This PR depends on #376. Once that has been merged, I'll rebase this on top of `main`. ------- Fixes include: * `NativeReader` now loads struct fields correctly. * `RawBinaryReader::ion_type` will return `None` if the current item is `StreamItem::Nothing`. Previously it would return the `IonType` of the m...
diff --git a/src/binary/raw_binary_reader.rs b/src/binary/raw_binary_reader.rs index 3a2f1fbfc..41b14fb11 100644 --- a/src/binary/raw_binary_reader.rs +++ b/src/binary/raw_binary_reader.rs @@ -295,7 +295,7 @@ impl<R: IonDataSource> StreamReader for RawBinaryReader<R> { // If the cursor is nested inside a p...
1
1
0
[{"id": "G0", "claim": "If the `expect` in `materialize_struct` can panic because a field has no value attached, its message should be more descriptive, e.g. \"Field: {} has no value attached to it\".", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
amazon-ion__ion-rust__380
amazon-ion/ion-rust
380
defect
c19cbbadc3409c6073bf8c991f1a98c8fa12cf9b
1021fc2af3b68674e0c660e25b23a4bbfd0d59dd
Text reader fixes: escapes, whitespace, IVMs
This PR depends on #379. When that PR is merged, this will be rebased on top of `main`. ------- Fixes include: * Extending the parser's definition of whitespace to include less common control characters like vertical tab and form feed. * Recognizing IVMs that are followed by '::' as annotations * Escape slash...
diff --git a/Cargo.toml b/Cargo.toml index 43d6d6933..ba28e8a75 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,7 @@ bytes = "0.4" chrono = "0.4" delegate = "0.5" thiserror = "1.0" -nom = "6.1" +nom = "7.1.1" num-bigint = "0.3" num-integer = "0.1.44" num-traits = "0.2" diff --git a/src/text/mod.rs b/src/tex...
3
1
0
[{"id": "G0", "claim": "The whitespace constants would be clearer written with Rust's built-in ASCII escapes like \\x09 instead of the \\u{0009}-style forms.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The reader's Unicode escape handling is ...
null
amazon-ion__ion-rust__384
amazon-ion/ion-rust
384
defect
0dc698aa011c22040a565b43f60fc317ed6b58c6
21b8ed92f609d2020db4f0775783bcde1de52b3f
Adds `NativeElementWriter`, string/clob validation, big `DecodedInt`s
This PR makes the following changes: * A native Rust `ElementWriter` implementation (`NativeElementWriter`) has been added with basic testing; it is not yet being used in `ion-tests`. * ion-tests integration has been refactored to facilitate running roundtrip tests with either the `IonCSliceElementWriter` or the...
diff --git a/src/binary/decimal.rs b/src/binary/decimal.rs index 4883429ff..460b8bc61 100644 --- a/src/binary/decimal.rs +++ b/src/binary/decimal.rs @@ -6,7 +6,9 @@ use arrayvec::ArrayVec; use bigdecimal::Zero; use crate::{ - binary::{int::Int, raw_binary_writer::MAX_INLINE_LENGTH, var_int::VarInt, var_uint::Var...
3
2
0
[{"id": "G0", "claim": "The vestigial `del_test` left in clob.rs is dead scaffolding from the author's exploration and should be removed from the pull request.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The hand-rolled i64 branch of DecodedI...
null
amazon-ion__ion-rust__386
amazon-ion/ion-rust
386
defect
791efb447ef0e1d1bd26787c7efa9cf9b77734ac
7fc1d2c696e4a9a380c22d1ebdc6550f7a497937
Writer tests; fixes:symbols, timestamps, big Ints
This PR makes the following changes: * Enables `ion-tests` integration for the `NativeElementWriter`, the pure-Rust DOM writing API. The `IonCSliceElementWriter` is now only used when paired with the `IonCElementReader`. * Adds a `Writer::write_integer` method that can encode an `Integer` of any size. * Lifts t...
diff --git a/ion-hash/src/representation.rs b/ion-hash/src/representation.rs index 293ebf5eb..84a3c4c31 100644 --- a/ion-hash/src/representation.rs +++ b/ion-hash/src/representation.rs @@ -69,7 +69,7 @@ where 0 => {} _ => { let magnitude = v.abs() as u64; - ...
5
1
0
[{"id": "G0", "claim": "The `encoded_length <= 13` check in RawBinaryWriter::write_integer should be written as `if encoded_length < 14` (or `< 0xE`) to match how the Ion spec words it.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The binary_w...
null
amazon-ion__ion-rust__430
amazon-ion/ion-rust
430
defect
65a8dd2eede0ef197ef618ff316b84e4b5a1e2b4
d24440617f3a10b8e2e01fce69343d3e73d33c45
Removes the separate `no_text_values` collection in Struct
* Introduces the `SymbolRef` type, a borrowed view of a text value for field lookups. * Introduces the `AsSymbolRef` trait to allow values to be temporarily viewed as a `SymbolRef`. * Modifies the `IonStruct` trait to use `AsSymbolRef` for lookups instead of `AsRef<str>`. This change enables lookups for unknown text....
diff --git a/Cargo.toml b/Cargo.toml index 368e66f84..c67df0da1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,6 +39,7 @@ num-integer = "0.1.44" num-traits = "0.2" arrayvec = "0.7" hashlink = "0.8.1" +smallvec = "1.9.0" [dev-dependencies] rstest = "0.9" diff --git a/src/lib.rs b/src/lib.rs index 5cd674d6e..790b...
4
3
1
[{"id": "G0", "claim": "The separate `no_text_fields` collection should be removed from the borrowed `StructRef` as well, just as it was removed from the owned `Struct`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Fix the typo in the new `AsSymbolRef`...
null
amazon-ion__ion-rust__442
amazon-ion/ion-rust
442
defect
94c83bf336f0c3902ac81b594f5d38774c097782
0a828b5fc3af198a3fb5be5a6f368423b0beadec
Enables GATs iteration in the Element API
This PR replaces all uses of `Box<dyn Iterator<Item=_> + 'a>` in the `Element` and `ElementRef` APIs with generic associated types. This means that heap allocations are no longer required to iterate over annotations, sequence elements, or struct fields. Because this change uses generic associated types, it also conf...
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 8bfec7e42..83d0181e0 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -23,7 +23,7 @@ jobs: with: profile: minimal # nightly can be very volatile--pin this to a version we ...
7
6
0
[{"id": "G0", "claim": "The temporarily-beta toolchain pin in CI should be tracked in an opened issue, perhaps one that references the relevant Rust issue.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The match arms in examples/read_all_values...
null
amazon-ion__ion-rust__478
amazon-ion/ion-rust
478
defect
e3f7bd131b3da493f002a83604540c0f8c66a1e7
0b2d8d683f5f4bf18d249997fcd456bbe4016112
Makes `ion-hash` a feature of `ion-rs`
*Issue #, if available:* Resolves #454 *Description of changes:* * Moves `ion-hash` from its own crate into `ion-rs` * Moves the `ion-hash-tests` submodule to the root of the repo * Updates the GHA workflow to run cargo tests with no features and with all features. * Creates a new version of `ion-hash` cra...
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 41097a81d..71267eae4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -44,11 +44,16 @@ jobs: with: command: build args: --verbose --workspace - - name: Cargo Test + - name: Carg...
2
1
0
[{"id": "G0", "claim": "Asks whether the optional `digest` dependency is meant to be pulled in when the `ion-hash` feature is enabled and, if so, whether `sha2` should also be listed in that feature's dependencies.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "cla...
null
amazon-ion__ion-rust__502
amazon-ion/ion-rust
502
defect
424a0a27256655eba4af7459190d60b1b6923a22
28574c78270e8757bf56dcd6d9bebb4520ce080b
Makes `List` and `SExp` thin wrappers around `Sequence`
See issue #500 for discussion. This PR removes the `IonSequence` trait and reintroduces a concrete `Sequence` type. It also converts `List` and `SExp` into tuple structs that wrap `Sequence`. `ListBuilder` and `SExpBuilder` have also been removed in favor of a single `SequenceBuilder` implementation with `build_l...
diff --git a/src/element/builders.rs b/src/element/builders.rs index fa317f033..1b45fe91d 100644 --- a/src/element/builders.rs +++ b/src/element/builders.rs @@ -1,83 +1,64 @@ -use crate::element::{Element, Struct}; +use crate::element::{Element, Sequence, Struct}; use crate::Symbol; -/// Constructs [List] values inc...
1
1
1
[{"id": "G0", "claim": "The new `Deref` impl letting `List`/`SExp` transparently expose `Sequence` methods is Deref polymorphism, an anti-pattern; the reviewer asks the author to explain why this approach was chosen instead of the alternatives.", "category": "design", "verdict": "supported", "priority": "P1", "scope": ...
null
amazon-ion__ion-rust__515
amazon-ion/ion-rust
515
defect
049da358483f5793092f4d7140052176750286d3
ea7f85fe7500cfef246b7fbc6cec0575c2d6c707
Fixes incorrect handling of SID 0 as symbol text
*Issue #, if available:* None. *Description of changes:* * Changes the system symbol constants to be `Option<&str>` and changes SID `$0` to `None` rather than `"$0"` * Propagate SID $0 through the text writers as a `RawSymbolToken` or `RawSymbolTokenRef` rather than forcing all symbols to be converted to text...
diff --git a/src/constants.rs b/src/constants.rs index 74ba40940..c50a5f417 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -1,15 +1,15 @@ pub(crate) mod v1_0 { - pub const SYSTEM_SYMBOLS: &[&str] = &[ - "$0", // $0 - "$ion", // $1 - "$ion_1_0",...
2
2
0
[{"id": "G0", "claim": "The inline Some/None match added in SymbolTable::initialize duplicates an existing SymbolTable helper method that could be used instead.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Now that RawSymbolToken[Ref] is plumb...
null
amazon-ion__ion-rust__517
amazon-ion/ion-rust
517
defect
4ccb027c02a9a707040393f98ad95f5d08108938
9bbd325bb1fbe2bcc0238b1e4a2bd1aaf40aa226
Adds IonData wrapper that uses Ion equivalence for equality
**Issue #, if available:** None **Description of changes:** * Adds `IonData`, a struct that can wrap anything that implements `IonEq`. * For `IonData<Element>`, I added some delegations to `Element` I thought would be required for it to be useful. There's the `read_*()` functions and `annotations()`, and `v...
diff --git a/src/element/bytes.rs b/src/element/bytes.rs index 7da039be6..205bd5ea6 100644 --- a/src/element/bytes.rs +++ b/src/element/bytes.rs @@ -15,7 +15,7 @@ /// let bytes: Bytes = b"world".into(); /// assert_eq!(&bytes, b"world".as_slice()); /// ``` -#[derive(Debug, Clone, PartialEq, Eq)] +#[derive(Debug, Clon...
8
8
1
[{"id": "G0", "claim": "The ordering rationale comment should lead with the logical reason for grouping the Ion types together (natural ordering), not just that the comparison is cheapest.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The IonData...
null
amazon-ion__ion-rust__542
amazon-ion/ion-rust
542
defect
33a8fb96cbfcee225e95581183282636529109b1
4f68c681140f8eb9130f2143f489f2267f61d615
Adds TokenStreamReader
`TokenStreamReader` adapts `TokenStream` into a user-level `Reader`. This also changes the support types for `ElementReader` to work with `IonReader` trait objects (adding `?Sized` to the type constraints). The `Element` round-trip tests are also adapted to work with _any_ `IonReader` as a boxed trait object, whi...
diff --git a/Cargo.toml b/Cargo.toml index f47311dd0..2082d2d81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,7 +56,8 @@ digest = { version = "0.9", optional = true } sha2 = { version = "0.9", optional = true } [dev-dependencies] -rstest = "0.16.0" +rstest = "0.17.0" +rstest_reuse = "0.5.0" # Used by ion-tests i...
2
1
0
[{"id": "G0", "claim": "The `ion_version` method (hard-coding 1.0 under an XXX) should not be part of this API; it probably belongs at a lower level or in some other trait.", "category": "design", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The variable `insn` should be spel...
null
amazon-ion__ion-rust__578
amazon-ion/ion-rust
578
defect
247ac349a286dffca931e732f7a369eac02f6166
6725e7da597167527253fd48afa9c9c23c1d3dc9
adds changes for shared symbol table support in reader
*Description of changes:* This PR works on adding shared symbol table support for reader. *List of changes:* * adds a method for `SharedSymbolTable` to be read using `Reader` * adds `SystemReader` changes for processing LST shared symbol table import * adds unit tests * modifies skip lists to consider shared sy...
diff --git a/src/catalog.rs b/src/catalog.rs index 8c50f13d5..614beea24 100644 --- a/src/catalog.rs +++ b/src/catalog.rs @@ -16,7 +16,13 @@ pub trait Catalog { fn get_table_with_version(&self, name: &str, version: usize) -> IonResult<SharedSymbolTable>; } -struct MapCatalog { +impl Default for MapCatalog { + ...
23
20
5
[{"id": "G0", "claim": "The catalog method `put_table` should be named `insert_table` for consistency with Rust's HashMap/BTreeMap.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The dev comment describing SST construction should be promoted to a doc com...
null
amazon-ion__ion-rust__673
amazon-ion/ion-rust
673
defect
755bc9933a7a516154e2fc28cb7b203a924b4a9b
7cf52ccbc0079d397a9e0ad2d9d7df1d7a4762a8
Adds integration testing for Ion 1.1
**Issue #, if available:** None **Description of changes:** * There are a few clippy changes because a new version of rust was released. * A large portion of the diff is `iontestdata` -> `iontestdata_1_0`. * Adds an `ion_1_1` module to `element_test_vectors.rs` integration testing for the Ion 1.1 reader. * ...
diff --git a/ion-tests b/ion-tests index d683bb130..327226503 160000 --- a/ion-tests +++ b/ion-tests @@ -1 +1 @@ -Subproject commit d683bb1309fc2dc318400bdf4df6be3c1feac999 +Subproject commit 327226503e84198ba97b88734a83430c620c4f46 diff --git a/src/ion_data/mod.rs b/src/ion_data/mod.rs index 2ba2565b0..3bae9b1e6 10064...
4
3
0
[{"id": "G0", "claim": "The comment stating that every grouping set is a list/sexp needs updating to include structs.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The to_owned() call on group in the struct embedded-documents branch can be skippe...
null
amazon-ion__ion-rust__819
amazon-ion/ion-rust
819
defect
4e8739f75b737458a88cfea95b4972b3bf94313d
c9e2eefb9978fcf40427941426a1806e41d498eb
Adds incompleteness detection tests
The text reader distinguishes between invalid input and incomplete input. If it encounters incomplete data, it tries to add more data to the buffer and try again. If it encounters invalid data, it surfaces the error to the user. This PR adds a test utility called `DataStraw`--an `io::Read` implementation that only y...
diff --git a/- b/- new file mode 100644 index 000000000..e69de29bb diff --git a/src/lazy/encoder/text/v1_0/value_writer.rs b/src/lazy/encoder/text/v1_0/value_writer.rs index 2d45d8877..f52beef3b 100644 --- a/src/lazy/encoder/text/v1_0/value_writer.rs +++ b/src/lazy/encoder/text/v1_0/value_writer.rs @@ -166,19 +166,6 @@...
3
2
0
[{"id": "G0", "claim": "The empty file added by this pull request looks unintentional and should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The tests may also need to cover input streams that return 0 bytes, not just byte-by-byte...
null
amazon-ion__ion-rust__833
amazon-ion/ion-rust
833
defect
6f04a8e3e9cbc62d56c7d46eb12563773b8baa08
978fbd3b72a9ffa08e9e63802eba32d952bfe061
Update conformance testing DSL to support unknown symbols
*Issue #, if available:* n/a *Description of changes:* This PR adds missing symbol notation for Toplevel and Produces clauses. This turned out to be a lot simpler than I had originally thought. My first (few) pass(es) through the spec left my understanding to be that the notation could define symbol mappings, wh...
diff --git a/src/lazy/binary/raw/v1_1/value.rs b/src/lazy/binary/raw/v1_1/value.rs index 7f0de9d0d..496191430 100644 --- a/src/lazy/binary/raw/v1_1/value.rs +++ b/src/lazy/binary/raw/v1_1/value.rs @@ -119,13 +119,7 @@ impl<'top> HasRange for &'top LazyRawBinaryValue_1_1<'top> { impl<'top> LazyRawValue<'top, BinaryEn...
10
9
1
[{"id": "G0", "claim": "Since the value is already known to be a null, construct `ValueRef::Null` from `read_null()` directly instead of calling `resolve(context)`, which requires a giant match over all of the Ion types.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id...
null
amazon-ion__ion-rust__86
amazon-ion/ion-rust
86
defect
3e4502b0f0171d42ed8cd8d5828915383fab8713
f6c5576048ee79703c88d6f7a5dd5cdd257babba
Adds value read tests for decimal/timestamp.
* Minor cleanup on BigDecimal conversion error message. * Makes the dereference for the `ION_DECIMAL` explicit to get at fraction because it makes CLion confused (and is technically clearer as to what is going on). Related to #42 and #43. By submitting this pull request, I confirm that my contribution is made...
diff --git a/ion-c-sys/src/lib.rs b/ion-c-sys/src/lib.rs index f5d04ee04..94f231daa 100644 --- a/ion-c-sys/src/lib.rs +++ b/ion-c-sys/src/lib.rs @@ -378,7 +378,10 @@ impl ION_DECIMAL { match unsafe { decContextGetStatus(&mut ctx) } { 0 => Ok(()), // FIXME amzn/ion-rust#79 - we need to...
1
1
0
[{"id": "G0", "claim": "The `&str` literal `\"DecNumber Not Supported\"`, which is produced and later matched on, should be made a constant.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
amazon-ion__ion-rust__873
amazon-ion/ion-rust
873
defect
4131347c9431ca37323113391464b339ff7a0b1e
c3d7787a4c67140b4711b3027cc0c2298816d51a
Switches from "encoding module" to "default module"
Builds on PR #872. Switches encoding directive syntax from: ```ion $ion_encoding::(/*...*/) ``` to: ```ion $ion::(module _ /*...*/) ``` in anticipation of multi-module support. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
diff --git a/benches/read_many_structs.rs b/benches/read_many_structs.rs index bca792d12..ddba86f30 100644 --- a/benches/read_many_structs.rs +++ b/benches/read_many_structs.rs @@ -396,7 +396,7 @@ mod benchmark { let name = test_data_1_1.name.as_str(); let empty_context = EncodingContext::for_ion_ve...
2
2
0
[{"id": "G0", "claim": "The hard-coded string \"module\" written by the encoder's directive should be replaced with a named system symbol constant.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "A pub const DEFAULT_MODULE_NAME should be introduc...
null
amazon-ion__ion-rust__911
amazon-ion/ion-rust
911
defect
a7c30d4542dff8d530faa43283c1033138171c92
8c40712d4a7fea94655940ef8591930222f0a235
Update ion-tests and start cataloging conformance issues.
*Issue #, if available:* #902 *Description of changes:* This PR adds a skip list to the conformance tests run during CI/CD, while also adding all of the current conformance tests to the generated unit tests. The skip list is implemented to skip test files, which may contain multiple tests. This was done because ...
diff --git a/ion-tests b/ion-tests index 9d73a411..a22bf437 160000 --- a/ion-tests +++ b/ion-tests @@ -1 +1 @@ -Subproject commit 9d73a4112a7754b392adede62d6a20bc219a036b +Subproject commit a22bf437148d6c88c48461c592096b27a1b06fa6 diff --git a/tests/conformance.rs b/tests/conformance.rs index 03bb7acc..84c9d7df 100644 ...
5
5
2
[{"id": "G0", "claim": "Unit tests fail on Windows because the skip list compares entries against file names using '/' while Windows paths use '\\' separators, so tests meant to be skipped are not skipped.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim...
null
amazon-ion__ion-rust__927
amazon-ion/ion-rust
927
defect
8eafc36981414d5fe9f115934d9b8c74714fed94
7531cd4b2ce91be14d1af6a122624715bb3a8181
Adds IonDataHash to enable Hash for IonData
**Issue #, if available:** None, but this is needed for Ion Schema Rust. **Description of changes:** * Adds `IonDataHash` trait with implementations for `Element`, `Value`, etc. * Implements `Hash` for `IonData` using `IonDataHash`. * Adds regular `Hash` for some other types where it makes sense, such as the...
diff --git a/src/element/annotations.rs b/src/element/annotations.rs index 2b149ba3..304c86b9 100644 --- a/src/element/annotations.rs +++ b/src/element/annotations.rs @@ -1,7 +1,8 @@ use crate::element::iterators::{AnnotationsIntoIter, SymbolsIterator}; -use crate::ion_data::IonOrd; +use crate::ion_data::{IonDataHash,...
1
1
0
[{"id": "G0", "claim": "The `IonOrd` trait could be renamed to `IonDataOrd` to suggest that it is practical machinery (an implementation detail of IonData) rather than a formally defined algorithm.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}]
null
amazon-ion__ion-rust__979
amazon-ion/ion-rust
979
defect
c2a965de56f305f7f3a78d5e9d027516bb44970f
30c6e18f11fb74cd34013311e3e0a2edea76dd5a
Implement `repeat` system macro.
*Issue #, if available:* #942 *Description of changes:* This PR adds an implementation for the builtin system macro `repeat`. In addition to the builtin implementation, I've also updated the conformance test skip-list to skip the only test in `system_macros/default.ion` that fails, and to remove `system_macros/r...
diff --git a/src/lazy/expanded/e_expression.rs b/src/lazy/expanded/e_expression.rs index 90851de8..91758a12 100644 --- a/src/lazy/expanded/e_expression.rs +++ b/src/lazy/expanded/e_expression.rs @@ -11,7 +11,7 @@ use crate::lazy::expanded::macro_evaluator::{ AnnotateExpansion, ConditionalExpansion, EExpressionArgG...
6
5
3
[{"id": "G0", "claim": "The new `repeat` macro needs unit tests; the PR shipped it with none.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Initialize `repeat_iterations` at construction by making `new` fallible, eliminating the `Option` and the branch...
null
amazon-ion__ion-rust__980
amazon-ion/ion-rust
980
defect
c2a965de56f305f7f3a78d5e9d027516bb44970f
b6f6550e3e0587c3465ad03884a792465e1db5e9
Implement sum system macro
*Issue #, if available:* #942 *Description of changes:* This PR adds an implementation for the `sum` system macro. In addition this PR removes `conformance/system_macros/sum.ion` from the skip-list. ``` Running tests: ion-tests/conformance/system_macros/sum.ion sum can be invoked ...
diff --git a/src/lazy/expanded/e_expression.rs b/src/lazy/expanded/e_expression.rs index 90851de8..dd6f14aa 100644 --- a/src/lazy/expanded/e_expression.rs +++ b/src/lazy/expanded/e_expression.rs @@ -11,7 +11,7 @@ use crate::lazy::expanded::macro_evaluator::{ AnnotateExpansion, ConditionalExpansion, EExpressionArgG...
1
1
1
[{"id": "G0", "claim": "The `sum` macro fails to fail when an argument expression produces multiple values (e.g. `(:sum 1 (:values 1 3))`), and the no-value and multi-value argument edge cases are missing from the unit tests.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
amazon-ion__ion-rust__981
amazon-ion/ion-rust
981
defect
aaeb84686ea31c967946c671317b4bd532b320b4
c4223f0ed07778f8a3776075423a1c8d593eb07b
Implement delta system macro.
*Issue #, if available:* #942 *Description of changes:* This PR implements the `delta` system macro. ``` Running tests: ion-tests/conformance/system_macros/delta.ion delta can be invoked ... [Ok] delta produces a stream of values that is the delta of ... [Ok] arg...
diff --git a/ion-tests b/ion-tests index 59be10a5..72143464 160000 --- a/ion-tests +++ b/ion-tests @@ -1 +1 @@ -Subproject commit 59be10a57ed4b2fc1ebcf7dd5d53360a16b8086a +Subproject commit 721434649c97baa3d5b9c9a56c1d61fbfd0a5fd7 diff --git a/src/lazy/expanded/e_expression.rs b/src/lazy/expanded/e_expression.rs index ...
1
1
0
[{"id": "G0", "claim": "The test's expected output should use an empty line to signal the empty stream from (:delta (::)), just as it already does for the empty stream from (:delta ).", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
amber-lang__amber__169
amber-lang/amber
169
defect
ec950702050344530090f9d326c95a67d54d5049
747cf3c80f9d913e41fa75d2f175663a7158c248
distinguish function calls that appear on the same line
I add the `col` to the `invocation_instance` so that Amber can distinguish function calls that appear on the same line.
diff --git a/src/modules/function/invocation.rs b/src/modules/function/invocation.rs index fd0e4521b..ee21c2e78 100644 --- a/src/modules/function/invocation.rs +++ b/src/modules/function/invocation.rs @@ -17,6 +17,7 @@ pub struct FunctionInvocation { variant_id: usize, id: usize, line: usize, + col: u...
1
1
0
[{"id": "G0", "claim": "Even though it should be merged so that a function can be called more than once on one line, this change terribly affects the code readability.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
amber-lang__amber__185
amber-lang/amber
185
defect
69e96ae3867091bcd374ff3cf42909324e73646e
efdbb9f3ad55e10e6ec4871dfbdde3f2b6da0510
feat(std): more commands
So I added more commands: * `move` a wrapper around `mv` * `change_dir` a wrapper around `cd` but in this way it is generated a `cd` command fine for shellcheck https://github.com/Ph0enixKM/Amber/issues/72 * `make_symbolic_link` a wrapper around `ln -s` * `create_dir` a wrapper around `mkdir -p` * `make_executab...
diff --git a/src/std/main.ab b/src/std/main.ab index 48bb27600..01cf61429 100644 --- a/src/std/main.ab +++ b/src/std/main.ab @@ -128,3 +128,52 @@ pub fun includes(arr, value) { } return false } + +pub fun create_symbolic_link(origin: Text, destination: Text): Bool { + if file_exist(origin) { + unsa...
4
3
2
[{"id": "G0", "claim": "make_executable should use the `path` parameter in file_exist and echo, declare a Bool return with proper returns, and drop the pre-existing $origin/$ brace typo; the same file_exist(origin) check is wrong in create_dir and switch_user_permission.", "category": "correctness", "verdict": "support...
null
amber-lang__amber__362
amber-lang/amber
362
defect
11b30105ced624e9bfc4d76f0e1641b7e4d2a861
4abcd6da87606cbcea178a012f73bc86852000e6
ci: require pr's to satisfy clippy requirements
close #352 If this pr merges, every following pr should fix clippy issues to pass ci, which means there will be more restrictions in writing code, sometimes maybe annoying. [clippy](https://github.com/rust-lang/rust-clippy) can fix some of its issues automatically, running `cargo clippy --fix --allow-dirty` to f...
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 60be6554d..e0a3c1372 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,28 +1,33 @@ -name: Cargo Build & Test +name: Cargo & Clippy Test on: push: + branches: [master] pull_request: + workflow_dispatch: ...
1
1
1
[{"id": "G0", "claim": "Caching the whole ./target directory reintroduces the amber build artifacts that Mte90 had deliberately excluded a week earlier, causing problems for the tests that run Amber manually; only ./target/deps should be cached.", "category": "correctness", "verdict": "supported", "priority": "P1", "sc...
null
amber-lang__amber__612
amber-lang/amber
612
defect
366e3975469659d2186e4d40b857db6aa704ce0b
51a3194b35e49ed4117bb353c3ebf62e309ba9f6
Minor annoyances with Amber tests
Fixes #611.
diff --git a/src/tests/postprocessor.rs b/src/tests/postprocessor.rs index 2cdff2c9c..df42b69b6 100644 --- a/src/tests/postprocessor.rs +++ b/src/tests/postprocessor.rs @@ -5,26 +5,17 @@ use super::compile_code; #[test] fn default_ok() { - let default = PostProcessor::get_default(); - let hello = "echo ...
2
1
0
[{"id": "G0", "claim": "Maybe rename the new test file `import_transitive_import.ab` to `import_transistive.ab` instead.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "It seems that the `import_existing_nested_file.ab` test file does not use the...
null
amber-lang__amber__850
amber-lang/amber
850
defect
80148a9508485128866803e74d41c84e1952990e
1d3ed0d888e759bfa9fc49fa7c360c18683a3667
Fix parsing of main arguments
Closes #846
diff --git a/src/modules/main.rs b/src/modules/main.rs index f8297c82f..6f527a797 100644 --- a/src/modules/main.rs +++ b/src/modules/main.rs @@ -70,7 +70,7 @@ impl TypeCheckModule for Main { meta.with_push_scope(true, |meta| { // Create variables for main arguments for arg in self.arg...
1
1
0
[{"id": "G0", "claim": "The assignment `self.args_global_id = ...` in the parse stage may no longer be necessary now that variables and scopes are declared in the typecheck stage, and should be removed if so.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
americanexpress__earlybird__163
americanexpress/earlybird
163
defect
dbfea5fede3407629888d18e23a1ecd0bf73fc1a
d642b18599bc492ad45210e2ed3cf990c877c5ca
feat: adding postprocess for basic auth header
Creating a post process for the basic auth as a second layer of validation where we are decrypting the base64 encrypted string and checking whether the decrypted data is in the format of user:password. The aim is to prevent false positive findings.
diff --git a/pkg/postprocess/basicAuthHeader.go b/pkg/postprocess/basicAuthHeader.go new file mode 100644 index 0000000..7d2d0b4 --- /dev/null +++ b/pkg/postprocess/basicAuthHeader.go @@ -0,0 +1,37 @@ +package postprocess + +import ( + "encoding/base64" + "strings" +) + +// decodeBase64 decodes a Base64-encoded string ...
2
2
1
[{"id": "G0", "claim": "Add a test case for the new IsBasicAuthHeader postprocess function, which the pull request did not yet contain.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Add code comments and a method-level explanation of what the IsBasicAu...
null
americanexpress__earlybird__60
americanexpress/earlybird
60
defect
5c725eb1843b0fc98a3c263d8a9e1ac4175dfcc0
67487c6df36f4287ff8e7458410d14c60ed2c044
feat(file-with-console): updated code based to broadcast and write it…
- Created a broadcast pkg to write multiple times from one channel. - Created a config flag `--withConsole` to display finding as a log while creating json file. - Updated [USAGE.md](https://github.com/americanexpress/earlybird/blob/main/docs/USAGE.md)
diff --git a/docs/USAGE.md b/docs/USAGE.md index 968154b..557a8af 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -50,7 +50,7 @@ Usage of go-earlybird: -file string Output file -- e.g., 'go-earlybird --file=/home/jdoe/myfile.csv' -format string - Output format [ console | json | csv ] (default "consol...
7
6
1
[{"id": "G0", "claim": "docs/USAGE.md misprints the new flag as `-wihtConsole` instead of `-withConsole`.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The sentence appended to the `-format` documentation ('To print finding in console with json f...
null
americanexpress__jest-image-snapshot__113
americanexpress/jest-image-snapshot
113
defect
5e9007355ce1c96fc9d9a5232092c26d7169738e
636d363f2bc8f5f3c1282c70896124603cdec347
feat(options): Add customDiffDir
Allows a custom diff directory to be set, by passing the `customDiffDir` option. Closes: #97
diff --git a/__tests__/__snapshots__/index.spec.js.snap b/__tests__/__snapshots__/index.spec.js.snap index ebcc844..02137d7 100644 --- a/__tests__/__snapshots__/index.spec.js.snap +++ b/__tests__/__snapshots__/index.spec.js.snap @@ -3,6 +3,7 @@ exports[`toMatchImageSnapshot passes diffImageToSnapshot everything it nee...
1
1
0
[{"id": "G0", "claim": "The new customDiffDir option should be documented in the README.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
americanexpress__jest-image-snapshot__148
americanexpress/jest-image-snapshot
148
defect
5ba416b554f953c392ee06e7d8cccd0de2c428e4
26c858af1537396d4ee14039feab1ba99e9b0ee8
Add option to use blur on compared images
As in readme - Applies Gaussian Blur on generated images. Useful when you have noise after scaling images per different resolutions on your target website. My problem was that I received a lot of random pixel differences on the same images on website between different runs because of downscaling. Applying a blur, us...
diff --git a/README.md b/README.md index 9aa38f5..ce2581e 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ See [the examples](./examples/README.md) for more detailed usage or read about a * `failureThreshold`: (default `0`) Sets the threshold that would trigger a test failure based on the `failureThresholdType...
3
3
2
[{"id": "G0", "claim": "The README entry for `blur` does not state its unit (the reviewer reads it as possibly 'out of 100') and should document that it accepts a radius in pixels and that a small value (1-2) is enough to remove scaling noise.", "category": "documentation", "verdict": "supported", "priority": "P1", "sc...
null
americanexpress__jest-image-snapshot__167
americanexpress/jest-image-snapshot
167
defect
4cf44b78525e20d87bc4a26d3d3548515ec93bb7
17b5ef2d8c6ec6f890cfca1e52b45d8fa51e47b7
Increase the maxBuffer to 10MB for the diff process
By default, Node's spawnSync has a maxBuffer of 1 MB. This bumps it up to 10 MB, which should reduce the chance of diffs on large images failing.
diff --git a/src/diff-snapshot.js b/src/diff-snapshot.js index 0c56041..2d2b865 100644 --- a/src/diff-snapshot.js +++ b/src/diff-snapshot.js @@ -240,7 +240,11 @@ function runDiffImageToSnapshot(options) { const writeDiffProcess = childProcess.spawnSync( process.execPath, [`${__dirname}/diff-process.js`], - ...
2
2
1
[{"id": "G0", "claim": "Add an integration test that validates the maxBuffer change so the large-image behaviour cannot regress unnoticed.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Add Node 13 to the travis config so the new regression test actuall...
null
americanexpress__jest-image-snapshot__183
americanexpress/jest-image-snapshot
183
defect
8195fc21bf18cc6c416cc6523f3faddd377abe04
a8f3b71bfebeab429bde9b502bda6fb028af54d5
fix: dumpDiffToConsole base64 string output
Closes https://github.com/americanexpress/jest-image-snapshot/issues/182
diff --git a/src/diff-snapshot.js b/src/diff-snapshot.js index 40f2407..956c9cf 100644 --- a/src/diff-snapshot.js +++ b/src/diff-snapshot.js @@ -213,7 +213,7 @@ function diffImageToSnapshot(options) { diffOutputPath, diffRatio, diffPixelCount, - imgSrcString: `data:image/png;base64,${p...
2
1
1
[{"id": "G0", "claim": "An integration test should be added covering the fixed base64 imgSrcString output of dumpDiffToConsole.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The base64 diff-output problem still occurs despite this PR, as shown by the l...
null
americanexpress__jest-image-snapshot__186
americanexpress/jest-image-snapshot
186
defect
aaa0f5a24839f568cf47655f46132060e02ab1ac
aadd35ce803cf9c05282639a902d5bbf96df36a4
chore(packages): Upgrade from pixelmatch 4.x to 5.x, and pngjs to 3.4
> Based on feedback from #152 this would be precursor to a 3.0.0 release. Upgrades pixelmatch & pngjs to latest releases. https://github.com/mapbox/pixelmatch/releases/tag/v5.0.0 Noteworthy changes from the pixelmatch release notes: * Improve matching performance by ~35%. * Bypass detailed comparison when ...
diff --git a/README.md b/README.md index 2f845cd..4369401 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Jest matcher that performs image comparisons using [pixelmatch](https://github.c npm i --save-dev jest-image-snapshot ``` - Please note that `Jest` `>=20 <=24` is a peerDependency. `jest-image-sna...
1
1
1
[{"id": "G0", "claim": "The pixelmatch 5 upgrade makes the now-redundant identicality check (issue #152) run unnecessary work on changed snapshots, potentially hurting performance; it should have been addressed before this was released.", "category": "performance", "verdict": "supported", "priority": "P1", "scope": "in...
null
americanexpress__jest-image-snapshot__211
americanexpress/jest-image-snapshot
211
defect
a8eb0c4389980751727947f00cf971a7ab0da02d
700f141dae49bb73feb796060ad80947162f5864
Fix no colors option
Hi! This PR fixes `noColors` option to allow chalk auto-detect colors support. Also, I had to add `env FORCE_COLOR=1` to the pre-commit hook: `"pre-commit": "env FORCE_COLOR=1 npm test"`. For some reasons chalk doesn't detect colors on windows 10 when executed by husky (https://github.com/typicode/husky/issues/350) a...
diff --git a/README.md b/README.md index a22a335..f61c316 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ See [the examples](./examples/README.md) for more detailed usage or read about a * `customDiffDir`: A custom absolute path of a directory to keep this diff in * `customSnapshotIdentifier`: A custom nam...
2
2
1
[{"id": "G0", "claim": "Add tests covering the changed noColors/coloring behavior in configureToMatchImageSnapshot.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new README wording for noColors is not clearer; leave the option's description as it w...
null
americanexpress__jest-image-snapshot__5
americanexpress/jest-image-snapshot
5
defect
343a863f920512af9fa719bb4df86afa47a477fa
8f5fd059996e5a695a6f69e427134284fc07b2f4
Add noColors option to matcher
Using some jasmine/jest reporters (for example jasmine-trx-reporter) will fail because of using chalk. chalk doesn't realize the terminal doesn't support color. This adds the option for the outcome of the test would not have styling inside of it.
diff --git a/README.md b/README.md index eea57e1..e4c450c 100644 --- a/README.md +++ b/README.md @@ -29,13 +29,17 @@ Jest matcher that performs image comparisons using [Blink-diff](https://github.c ### Optional configuration: -`toMatchImageSnapshot()` takes an optional options object where you can provide your own...
3
2
1
[{"id": "G0", "claim": "Write tests for the new noColors behavior (and confirm the CLA is signed).", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The noColors option's purpose is unclear: chalk should already detect terminal color support, so the option...
null
amethyst__sheep__10
amethyst/sheep
10
defect
86f3f5f73e37037825844fb14a093f6b522d763b
b3431e4f7a0e6c8b88c60bc0a9db5685739c1dd8
Implement maxrects packer
This implements the MAXRECTS algorithm (using the best short side fit heuristic), as detailed in the paper [A thousand ways to pack the bin](https://github.com/juj/RectangleBinPack) by Jukka Jylänki. Since this code was ported pretty much directly from the CPP version, there's probably still improvements that can be ma...
diff --git a/sheep/examples/simple_pack/main.rs b/sheep/examples/simple_pack/main.rs index 72f8037..b606e40 100644 --- a/sheep/examples/simple_pack/main.rs +++ b/sheep/examples/simple_pack/main.rs @@ -27,11 +27,19 @@ fn main() { // Do the actual packing! 4 defines the stride, since we're using rgba8 we // h...
4
4
0
[{"id": "G0", "claim": "The pack_regular test is unfinished: it packs 10,000 sprites with default options and asserts nothing.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "place_rect should use swap_remove instead of remove on self.free, since the ord...
null
amethyst__specs__103
amethyst/specs
103
defect
95f52d0af132de1a77c0eac41b3debd4ca8f006e
70c024220c6a99dae9bba9e13e0676ac4d4b0439
Ticketed locks
Fixes #53 Has "ticket" feature that is enabled by default. Embrace parallel execution!
diff --git a/.travis.yml b/.travis.yml index 492468df5..a9d61fca5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ script: - cargo test --verbose - cargo build --verbose --no-default-features - cargo test --verbose --no-default-features +- cargo test --verbose --no-default-features --features parallel a...
1
1
0
[{"id": "G0", "claim": "The doc comments should read 'a resource' instead of 'an resource', including the same mistake at lines 442 and 487.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
amethyst__specs__260
amethyst/specs
260
defect
0e222304f1c15d3adc037020dc5ac617d92e71cd
9d0f23bd31f439e1587254f1ab5a08e4f5aaf7d3
Use Result in several places and solve double deletion problem
Not meant to be merged as is Fixes #94
diff --git a/.rustfmt.toml b/.rustfmt.toml index 803b20673..bcd22c63c 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -1,3 +1,5 @@ +attributes_on_same_line_as_field = false +attributes_on_same_line_as_variant = false reorder_imports = true reorder_import_names = true reorder_imports_in_group = true diff --git a/be...
2
1
0
[{"id": "G0", "claim": "The `action` field of `WrongGeneration` should be an enum or a `&'static str` rather than an owned `String`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Some clients may track entity lifetimes better themselves, so the PR shoul...
null
amethyst__specs__369
amethyst/specs
369
defect
3186d0fd618481354879df9065fe3f42d0e4c29b
1fdc4c433515cc7838a0eea90b17f18f2fadf1c6
Upgrade to latest shred version
<!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/slide-rs/specs/369) <!-- Reviewable:end -->
diff --git a/Cargo.toml b/Cargo.toml index 4c4edf0ef..80d8e9609 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ derivative = "1" fnv = "1.0" hibitset = { version = "0.5.0", features = ["parallel"] } mopa = "0.2" -shred = "0.7.0-alpha2" +shred = "0.7.0-alpha3" shrev = "0.8.0" shred-derive = "0.5.0-alpha1...
3
1
0
[{"id": "G0", "claim": "The reindented bench_function call chain in benches/storage_sparse.rs has funky formatting.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The panic in TryDefault::unwrap_default could be replaced with `expect`.", "catego...
null
amethyst__specs__386
amethyst/specs
386
defect
4d363a95df4f7cb2d44fae5580a5d49ea4ed02a6
c7b9dcbc3aea90cfc9586cd16eec4fb712641c98
Add must_use to InsertResult
Fixes #385 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/slide-rs/specs/386) <!-- Reviewable:end -->
diff --git a/Cargo.toml b/Cargo.toml index 68a0ee26b..5274af8e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,7 @@ crossbeam = "0.3.0" derivative = "1" fnv = "1.0" hibitset = { version = "0.5.0", features = ["parallel"] } +log = "0.4" mopa = "0.2" shred = "0.7.0-alpha5" shrev = "0.8.0" diff --git a/src/li...
3
3
1
[{"id": "G0", "claim": "In EntityBuilder::with the insert should not fail before deletion is maintained, so the added EntityIsDead guard and warning handle a case that cannot occur.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "InsertResult should ...
null
amethyst__specs__426
amethyst/specs
426
defect
26ebad8d078ce193f573116b6839fc605c363bfe
76ac988412eef9588b4544de8c97bb17b38135e9
Added common Builder trait for EntityBuilder and LazyBuilder
PR for #422. Hopefully I did it right. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/slide-rs/specs/426) <!-- Reviewable:end -->
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8611c34d3..c2ff3f176 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 0.12.0 + +* Add common `Builder` trait to `EntityBuilder` and `LazyBuilder` ([#426]) +* Add common `MarkedBuilder` trait to `EntityBuilder` and `LazyBuilder` ([#426]) + # 0.11.4 * Add ...
6
5
0
[{"id": "G0", "claim": "There should also be a serde-gated `MarkedBuilder` extension trait providing `marked` on the builders.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}, {"id": "G1", "claim": "The Builder trait should also cover EntityResBuilder, which was merged the day...
null
amethyst__specs__43
amethyst/specs
43
defect
b466063b12998fa900986567402d20c5145517b3
b667dd8d5cd6c5f18aa5b5c8c111a6ccbf074614
Major Storage refactor
Fixes #32 Major changes: - `BitSet` is exposed directly - `VecStorage` and `HashMapStorage` implementations are much simpler, all the shared logic is moved up to the `MaskedStorage` and `Storage` types - `Storage` is no longer a trait but a struct, which allows using its methods without any `use` items - Storages no ...
diff --git a/src/bitset.rs b/src/bitset.rs index 2a94d3025..196d3a36f 100644 --- a/src/bitset.rs +++ b/src/bitset.rs @@ -208,10 +208,10 @@ pub trait BitSetLike { fn layer0(&self, i: usize) -> u32; /// Create an iterator that will scan over the keyspace - fn iter(self) -> Iter<Self> + fn iter(self) -> ...
4
3
3
[{"id": "G0", "claim": "The join iterator should not do the transmute itself; the mutable transmute should be pushed down into the trait, since transmute_copy of the values there will be a problem if anyone's O::Value is something other than a borrow.", "category": "design", "verdict": "supported", "priority": "P1", "s...
null
amethyst__specs__44
amethyst/specs
44
defect
b2f549777eb8a8d5f811bcec5c6d11c72b4f3942
18a16dfb3d64967c51c0e89f80b024e72dd82e5b
Refactor how allocation/deletion works
- The DynamicEntityIter is removed - Allocation / Deletion can be done without a write lock - Add the ability to `Join` over the `entities()` This removes the `add_list/sub_list` in-favour of atomic bit sets. Killing an Entity sets a bit atomically that can be looked up later during the merge. Raising a dead entity is...
diff --git a/examples/basic.rs b/examples/basic.rs index 3bb1ac59e..cbccb0d71 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -7,6 +7,7 @@ impl specs::Component for CompInt { // VecStorage is meant to be used for components that are in almost every entity type Storage = specs::VecStorage<CompInt>; ...
10
7
0
[{"id": "G0", "claim": "The comment on CompFloat in examples/basic.rs is wrong: it says HashMapStorage is better for components met rarely while the storage is VecStorage.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "add_atomic on AtomicBitSet s...
null
amethyst__specs__501
amethyst/specs
501
defect
c1cd323ee89b09f0a4533e23887898ff8b36459a
9f18506461253bdd1ccb73620a42c263e5328cfc
Removed cyclic dependency from specs-derive
<3 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/slide-rs/specs/501) <!-- Reviewable:end -->
diff --git a/specs-derive/Cargo.toml b/specs-derive/Cargo.toml index 61bae33d2..02997bb11 100644 --- a/specs-derive/Cargo.toml +++ b/specs-derive/Cargo.toml @@ -13,9 +13,5 @@ proc-macro2 = "0.4" syn = "0.15" quote = "0.6" -[dev-dependencies] -specs = { path = "..", features = ["serde"] } -serde = "1" - [lib] proc...
1
1
0
[{"id": "G0", "claim": "The top-level `use spocs::{Entity, saveload::Marker, error::NoError};` in tests/saveload.rs looks duplicated and may not be needed there.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
amethyst__specs__584
amethyst/specs
584
defect
a951dcf530ae551f80e619de3f2795653404082e
b934a0ab140b5b4162ab1805c8b6a1c3c7bf033e
Uuid Marker
## Checklist * [X] I've added tests for all code changes and additions (where applicable) * [ ] I've added a demonstration of the new feature to one or more examples * [ ] I've updated the book to reflect my changes * [X] Usage of new public items is shown in the API docs ## API changes Added UuidMarker and...
diff --git a/Cargo.toml b/Cargo.toml index 7c5baa122..fba9238d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,6 +34,7 @@ shred-derive = "0.6.0" tuple_utils = "0.3" rayon = { version = "1.0.0", optional = true } nonzero_signed = "1.0.1" +uuid = { version = "0.7.4", optional = true, features = ["v4", "serde"] } s...
2
1
1
[{"id": "G0", "claim": "The `set_uuid` setter should not be permitted because setting a new uuid on an existing marker would invalidate the uuid-to-entity mapping.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Question whether the uuid dependency (...
null
amethyst__specs__594
amethyst/specs
594
defect
de294b7bfc18a702771a16e17840c4054cded7d6
5575b8ee3692367af910d40375b265df290f2170
Replace U64Marker with SimpleMarker<T: ?Sized>
Fixes #592 ## Checklist * [x] I've added tests for all code changes and additions (where applicable) * [x] I've added a demonstration of the new feature to one or more examples * [x] I've updated the book to reflect my changes * [x] Usage of new public items is shown in the API docs ## API changes Break...
diff --git a/docs/tutorials/src/13_saveload.md b/docs/tutorials/src/13_saveload.md index fb2ae0873..6604ba656 100644 --- a/docs/tutorials/src/13_saveload.md +++ b/docs/tutorials/src/13_saveload.md @@ -15,12 +15,34 @@ Let's go over everything, point by point: ## `Marker` and `MarkerAllocator` -`Marker` and `MarkerA...
2
2
2
[{"id": "G0", "claim": "Deriving the standard traits on SimpleMarker<T: ?Sized> forces T to also be Clone + Debug + Eq + Hash (contrary to the PhantomData docs), and the author asks whether there is a fix, e.g. putting the bounds on `where SimpleMarker<T>: Clone + Debug + Eq + Hash + Send + Sync` instead.", "category":...
null
amethyst__specs__674
amethyst/specs
674
defect
15b1022556b1622e71ef78c29cacb44e73213986
99e4d62c26dcd2fc764ae61c9fa1995495cc8743
Remove send+sync requirement if not parallel
Closes #673
diff --git a/CHANGELOG.md b/CHANGELOG.md index cab8605c5..cfd97a6cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 0.16.0 + +* Components and resources no longer need to be `Send + Sync` if parallel feature is disabled ([#673]) +* Remove the `nightly` feature ([#673]) + +[#672]: https://github.com/sli...
3
2
2
[{"id": "G0", "claim": "Add a test that the non-`\"parallel\"` build works with a `!Send + !Sync` type, e.g. adding a `struct NonSend(pub Rc<u32>)` to the `World`.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Building specs with `cargo test --no-defau...
null
amethyst__specs__766
amethyst/specs
766
defect
81073f340425803c99e3292fa14ceb00245bfea5
e2a730083efa2a7d783354da02cad87dce594989
Delete components after killing entities to avoid clearing components when the entity has the wrong generation
<!-- Before creating a PR, please make sure you read the contribution guidelines. --> <!-- Feel free to delete points if they don't make sense for this PR. --> <!-- You can tick boxes by putting an "x" inside the braces, or by clicking them once the comment is published. --> <!-- Please use "Fixes #nr" and "Relate...
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1d180b7f..abfd05d63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,7 +56,8 @@ jobs: # if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest' # run tests - - run: cargo install cargo-hack ...
1
1
1
[{"id": "G0", "claim": "The changelog entries sit under the old '# 0.19.0 (2022-07-15)' heading, and the reviewer asks whether they belong to the new version — requesting that, if they stay here, the title be changed back to 'Unreleased' and the wrong date removed.", "category": "documentation", "verdict": "supported",...
null