What's the best way to handle failing SourceKit tests?

Hi,

I'm currently working on SR-1115, adding initializers to Int and Uint to
convert from UnsafePointer, and after making my changes,
the SourceKit/DocSupport/doc_swift_module.swift tests are failing.
(Failures attached).

Presumably this is because the new initializers affect the SourceKit
mappings, but unfortunately, it looks like most of the changes are to key
offsets, and while most of the offsets have increased by 115, not all of
them have, and I'm not even sure increasing the offsets by 115 is the
correct change. I could just make the test pass by increasing the offsets
as shown in the test failure, I'm worried that this could end up creating
an invalid test case, which in the worst case could hide SourceKit problems
in the future.

Since any changes to the standard library probably affect these tests, I
was wondering what the best way to resolve these failures is. Thanks.

SourceKit Test Failures.txt (282 KB)

+Argyrios

···

On Mon, Apr 11, 2016 at 7:55 PM, Michael Buckley via swift-dev <swift-dev@swift.org> wrote:

Hi,

I'm currently working on SR-1115, adding initializers to Int and Uint to
convert from UnsafePointer, and after making my changes, the
SourceKit/DocSupport/doc_swift_module.swift tests are failing. (Failures
attached).

Presumably this is because the new initializers affect the SourceKit
mappings, but unfortunately, it looks like most of the changes are to key
offsets, and while most of the offsets have increased by 115, not all of
them have, and I'm not even sure increasing the offsets by 115 is the
correct change. I could just make the test pass by increasing the offsets as
shown in the test failure, I'm worried that this could end up creating an
invalid test case, which in the worst case could hide SourceKit problems in
the future.

Since any changes to the standard library probably affect these tests, I was
wondering what the best way to resolve these failures is. Thanks.

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr@gmail.com>*/

Confirm that the source text printed out at the beginning is as you expect. It is highly unlikely your changes caused something wrong with the offsets, so if the source text is fine it should be good to update the expected output.
If the offsets changed without the source text changing, then we have an issue with the offsets.

···

On Apr 11, 2016, at 7:55 PM, Michael Buckley via swift-dev <swift-dev@swift.org> wrote:

Hi,

I'm currently working on SR-1115, adding initializers to Int and Uint to convert from UnsafePointer, and after making my changes, the SourceKit/DocSupport/doc_swift_module.swift tests are failing. (Failures attached).

Presumably this is because the new initializers affect the SourceKit mappings, but unfortunately, it looks like most of the changes are to key offsets, and while most of the offsets have increased by 115, not all of them have, and I'm not even sure increasing the offsets by 115 is the correct change. I could just make the test pass by increasing the offsets as shown in the test failure, I'm worried that this could end up creating an invalid test case, which in the worst case could hide SourceKit problems in the future.

Since any changes to the standard library probably affect these tests, I was wondering what the best way to resolve these failures is. Thanks.
<SourceKit Test Failures.txt>_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Thank you very much. The source printed out at the beginning is indeed what
I expect, so I will update the offsets. Thanks again.

···

On Tue, Apr 12, 2016 at 10:40 AM, Argyrios Kyrtzidis <kyrtzidis@apple.com> wrote:

Confirm that the source text printed out at the beginning is as you
expect. It is highly unlikely your changes caused something wrong with the
offsets, so if the source text is fine it should be good to update the
expected output.
If the offsets changed without the source text changing, then we have an
issue with the offsets.

> On Apr 11, 2016, at 7:55 PM, Michael Buckley via swift-dev < > swift-dev@swift.org> wrote:
>
> Hi,
>
> I'm currently working on SR-1115, adding initializers to Int and Uint to
convert from UnsafePointer, and after making my changes, the
SourceKit/DocSupport/doc_swift_module.swift tests are failing. (Failures
attached).
>
> Presumably this is because the new initializers affect the SourceKit
mappings, but unfortunately, it looks like most of the changes are to key
offsets, and while most of the offsets have increased by 115, not all of
them have, and I'm not even sure increasing the offsets by 115 is the
correct change. I could just make the test pass by increasing the offsets
as shown in the test failure, I'm worried that this could end up creating
an invalid test case, which in the worst case could hide SourceKit problems
in the future.
>
> Since any changes to the standard library probably affect these tests, I
was wondering what the best way to resolve these failures is. Thanks.
> <SourceKit Test
Failures.txt>_______________________________________________
> swift-dev mailing list
> swift-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev