Commit 1e6ecd4
committed
go/packages: don't crash if given an invalid overlay
If the user of go/packages passes an overlay package that results in a
package having Go files in multiple directories, return an error instead
of crashing.
This is more of a bandaid than a fix for anything, but go/packages is
hard to follow even with full data. Without it I don't really have a
clue, so this is the best I've got.
Fixes golang/go#43520, I guess.
Change-Id: I37537ae2e0126f715719273ed9a6708ed53b850f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/282732
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>1 parent 88ba5d0 commit 1e6ecd4
1 file changed
+14
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
39 | | - | |
40 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
441 | 443 | | |
442 | 444 | | |
443 | 445 | | |
444 | | - | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
445 | 449 | | |
446 | | - | |
447 | | - | |
| 450 | + | |
448 | 451 | | |
449 | 452 | | |
450 | 453 | | |
451 | | - | |
| 454 | + | |
452 | 455 | | |
453 | 456 | | |
454 | | - | |
455 | | - | |
| 457 | + | |
| 458 | + | |
456 | 459 | | |
457 | | - | |
| 460 | + | |
458 | 461 | | |
459 | 462 | | |
460 | 463 | | |
| |||
0 commit comments