Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Golang - Unable to use SDK v4 due to unused import of net/url #765

Closed
Jberlinsky opened this issue Jul 26, 2021 · 1 comment · Fixed by #767
Closed

Golang - Unable to use SDK v4 due to unused import of net/url #765

Jberlinsky opened this issue Jul 26, 2021 · 1 comment · Fixed by #767

Comments

@Jberlinsky
Copy link

When using github.com/looker-open-source/sdk-codegen/go@v0.0.2-0.20210707183859-6b3895d35e13, importing sdk/v4 yields an error due an an unused import of net/url:

❯ make
go build -o my-looker-client
# github.com/looker-open-source/sdk-codegen/go/sdk/v4
../../../../go/pkg/mod/github.com/looker-open-source/sdk-codegen/go@v0.0.2-0.20210707183859-6b3895d35e13/sdk/v4/models.go:39:3: imported and not used: "net/url"
make: *** [build] Error 2
make  19.85s user 5.40s system 399% cpu 6.313 total

At a quick glance, it does not appear that net/url (defined in https://github.com/looker-open-source/sdk-codegen/blob/main/go/sdk/v4/models.go#L39) is used. There are two potential remediations here:

  1. If net/url does not need to be imported, remove the import line.
  2. If there is a side effect from importing net/url that I'm not seeing, in accordance with the Golang spec, the import should be declared as _ "net/url"):

An import declaration declares a dependency relation between the importing and imported package. It is illegal for a package to import itself, directly or indirectly, or to directly import a package without referring to any of its exported identifiers. To import a package solely for its side-effects (initialization), use the blank identifier as explicit package name: import _ "lib/math"

@joeldodge79
Copy link
Contributor

joeldodge79 added a commit that referenced this issue Jul 27, 2021
url.URL type properties were removed in v4 as of 21.8

fixes: #765
joeldodge79 added a commit that referenced this issue Jul 27, 2021
url.URL type properties were removed in v4 as of 21.8

fixes: #765
jkaster added a commit that referenced this issue Jul 28, 2021
🤖 I have created a release \*beep\* \*boop\*
---
<details><summary>sdk-codegen-all: 1.12.0</summary>


### Features

* add 2 Python examples (pause/copy schedules, kill queries) ([#757](https://www.github.com/looker-open-source/sdk-codegen/issues/757)) ([787eeeb](https://www.github.com/looker-open-source/sdk-codegen/commit/787eeeb16d34dc27af01deef40fd69e175186f65))
* adding python example for folder permission access ([#758](https://www.github.com/looker-open-source/sdk-codegen/issues/758)) ([21e52df](https://www.github.com/looker-open-source/sdk-codegen/commit/21e52df573fcedab65449b3554d4f35ddee503d3))
* python barebones schedule plan example ([#763](https://www.github.com/looker-open-source/sdk-codegen/issues/763)) ([57cd05b](https://www.github.com/looker-open-source/sdk-codegen/commit/57cd05b2bc6b0427bb72eca57d91a0435de3785c))


### Bug Fixes

* dev portal apix tweaks ([#760](https://www.github.com/looker-open-source/sdk-codegen/issues/760)) ([6e937f4](https://www.github.com/looker-open-source/sdk-codegen/commit/6e937f4778457021dd739e849e209ad4de7bb450))
* improved writeable type support ([#766](https://www.github.com/looker-open-source/sdk-codegen/issues/766)) ([be91bd8](https://www.github.com/looker-open-source/sdk-codegen/commit/be91bd8e772f9a64c47486b317f1ac1f6ef14327))
* remove unused net/url import from go ([#767](https://www.github.com/looker-open-source/sdk-codegen/issues/767)) ([35d912c](https://www.github.com/looker-open-source/sdk-codegen/commit/35d912c1e31e5817a2b6a81084753a66a4860338)), closes [#765](https://www.github.com/looker-open-source/sdk-codegen/issues/765)
* support response observer chaining ([025618c](https://www.github.com/looker-open-source/sdk-codegen/commit/025618c806efc1664b4f573248ad5a64d6cee3e3))
* uses consistent heading text ([#761](https://www.github.com/looker-open-source/sdk-codegen/issues/761)) ([2e308ec](https://www.github.com/looker-open-source/sdk-codegen/commit/2e308ec1c6b4f181be12dda806955f8913336234))
</details>
<details><summary>@looker/api-explorer: 0.9.16</summary>


### Bug Fixes

* dev portal apix tweaks ([#760](https://www.github.com/looker-open-source/sdk-codegen/issues/760)) ([6e937f4](https://www.github.com/looker-open-source/sdk-codegen/commit/6e937f4778457021dd739e849e209ad4de7bb450))
* uses consistent heading text ([#761](https://www.github.com/looker-open-source/sdk-codegen/issues/761)) ([2e308ec](https://www.github.com/looker-open-source/sdk-codegen/commit/2e308ec1c6b4f181be12dda806955f8913336234))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/code-editor bumped from ^0.1.7 to ^0.1.8
    * @looker/run-it bumped from ^0.9.15 to ^0.9.16
    * @looker/sdk bumped from ^21.10.1 to ^21.10.2
  * devDependencies
    * @looker/sdk-node bumped from ^21.10.1 to ^21.10.2
</details>
<details><summary>@looker/sdk: 21.10.2</summary>


### Bug Fixes

* improved writeable type support ([#766](https://www.github.com/looker-open-source/sdk-codegen/issues/766)) ([be91bd8](https://www.github.com/looker-open-source/sdk-codegen/commit/be91bd8e772f9a64c47486b317f1ac1f6ef14327))
</details>
<details><summary>@looker/sdk-codegen: 21.0.22</summary>


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk-rtl bumped from ^21.0.17 to ^21.0.18
</details>
<details><summary>@looker/sdk-node: 21.10.2</summary>


### Bug Fixes

* improved writeable type support ([#766](https://www.github.com/looker-open-source/sdk-codegen/issues/766)) ([be91bd8](https://www.github.com/looker-open-source/sdk-codegen/commit/be91bd8e772f9a64c47486b317f1ac1f6ef14327))
* support response observer chaining ([025618c](https://www.github.com/looker-open-source/sdk-codegen/commit/025618c806efc1664b4f573248ad5a64d6cee3e3))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.10.1 to ^21.10.2
</details>
<details><summary>@looker/sdk-rtl: 21.0.18</summary>


### Bug Fixes

* browserTransport.ts retains ok: false now ([#745](https://www.github.com/looker-open-source/sdk-codegen/issues/745)) ([451481c](https://www.github.com/looker-open-source/sdk-codegen/commit/451481c62cdc986c860c582e4a77e3e887c6a732))
</details>
<details><summary>looker_sdk: 21.10.1</summary>


### Bug Fixes

* improved writeable type support ([#766](https://www.github.com/looker-open-source/sdk-codegen/issues/766)) ([be91bd8](https://www.github.com/looker-open-source/sdk-codegen/commit/be91bd8e772f9a64c47486b317f1ac1f6ef14327))
</details>
<details><summary>@looker/extension-sdk: 21.10.2</summary>


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.10.1 to ^21.10.2
</details>
<details><summary>@looker/code-editor: 0.1.8</summary></details>
<details><summary>@looker/extension-sdk-react: 21.10.2</summary>


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/extension-sdk bumped from ^21.10.1 to ^21.10.2
    * @looker/sdk bumped from ^21.10.1 to ^21.10.2
</details>
<details><summary>@looker/sdk-codegen-scripts: 21.0.23</summary>


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.10.0 to ^21.10.1
    * @looker/sdk-codegen bumped from ^21.0.21 to ^21.0.22
    * @looker/sdk-node bumped from ^21.10.0 to ^21.10.1
    * @looker/sdk-rtl bumped from ^21.0.17 to ^21.0.18
</details>
<details><summary>@looker/wholly-sheet: 0.5.14</summary>


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.10.1 to ^21.10.2
  * devDependencies
    * @looker/sdk-node bumped from ^21.10.1 to ^21.10.2
</details>
<details><summary>@looker/run-it: 0.9.16</summary>


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.10.1 to ^21.10.2
    * @looker/code-editor bumped from ^0.1.7 to ^0.1.8
</details>
<details><summary>@looker/hackathon: 21.10.2</summary>


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/extension-sdk bumped from ^21.10.1 to ^21.10.2
    * @looker/extension-sdk-react bumped from ^21.10.1 to ^21.10.2
    * @looker/sdk bumped from ^21.10.1 to ^21.10.2
    * @looker/wholly-sheet bumped from ^0.5.13 to ^0.5.14
</details>
<details><summary>@looker/extension-api-explorer: 21.11.1</summary>


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/api-explorer bumped from ^0.9.15 to ^0.9.16
    * @looker/extension-sdk bumped from ^21.10.1 to ^21.10.2
    * @looker/extension-sdk-react bumped from ^21.10.1 to ^21.10.2
    * @looker/run-it bumped from ^0.9.15 to ^0.9.16
    * @looker/sdk bumped from ^21.10.1 to ^21.10.2
</details>


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: John Kaster <kaster@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants