Skip to content

Revert "Add gopkg.in to knownImports (#260)"#358

Merged
pmbethe09 merged 1 commit intobazel-contrib:masterfrom
apelisse:revert-260
Apr 5, 2017
Merged

Revert "Add gopkg.in to knownImports (#260)"#358
pmbethe09 merged 1 commit intobazel-contrib:masterfrom
apelisse:revert-260

Conversation

@apelisse
Copy link
Copy Markdown
Contributor

@apelisse apelisse commented Apr 5, 2017

This reverts commit bfa3601.

This fails for "http://gopkg.in/natefinch/lumberjack.v2" for example.

@bazel-io
Copy link
Copy Markdown

bazel-io commented Apr 5, 2017

Can one of the admins verify this patch?

@pmbethe09 pmbethe09 merged commit dbb4fc5 into bazel-contrib:master Apr 5, 2017
groodt pushed a commit to groodt/rules_go that referenced this pull request Mar 14, 2022
Desugar the locals in object comprehensions
"traditionally" instead of handling them manually.

Object comprehensions allow the locals to depend
on the index variable which means that they are separate
for each field. It doesn't make sense to treat them as
a property of the whole object.

Fixes bazel-contrib#358.
yushan26 pushed a commit to yushan26/rules_go that referenced this pull request Jun 16, 2025
add missing docstrings for rules_python_external

also remove unused attr on pip_repository repo rule
TvdW pushed a commit to TvdW/rules_go that referenced this pull request Dec 23, 2025
…el-contrib#358)

This PR adds support for built-in conversion functions, such as
`string(x)`, used as index expr. Currently, without this support,
NilAway reports a false positive for the example below.
```
func test(v uint8) {
		m := make(map[string]*int)
		if m[string(v)] != nil {
			_ = *m[string(v)]  // false positive was reported here
		}
}
```

Go compiler doesn't treat `string(x)` as a call to a built-in function
named “string”, but instead it's considered to be a conversion using the
predeclared type string. Therefore, our existing logic of
`*types.BuiltIn` did not cover this case. We had to add special support
for this case by checking for
`pass.TypesInfo.ObjectOf(ident).Type().(*types.Basic)`.

[Closes bazel-contrib#357 ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants