lukewilliamboswell / roc-json

Json package for Roc
https://lukewilliamboswell.github.io/roc-json/
Universal Permissive License v1.0
21 stars 13 forks source link

warning explicit builtin import #26

Closed Anton-4 closed 5 months ago

Anton-4 commented 5 months ago

With the latest nightly there are some new warnings:

── EXPLICIT BUILTIN IMPORT in ./examples/Json/main.roc ─────────────────────────

Decode.DecodeResult was imported here:

9│  import Decode exposing [DecodeResult, fromBytesPartial]
                            ^^^^^^^^^^^^

All types from builtins are automatically exposed, so you can remove
DecodeResult from the exposing list.

Tip: Learn more about builtins in the tutorial: 
<https://www.roc-lang.org/tutorial#builtin-modules>

── EXPLICIT BUILTIN IMPORT in ...VG_SEhOFZucS3iBozlRdObWsfKaYZMHVE_q0/Core.roc ─

Encode.Encoder was imported here:

43│              Encoder,
                 ^^^^^^^

All types from builtins are automatically exposed, so you can remove
Encoder from the exposing list.

Tip: Learn more about builtins in the tutorial: 
<https://www.roc-lang.org/tutorial#builtin-modules>

── EXPLICIT BUILTIN IMPORT in ...VG_SEhOFZucS3iBozlRdObWsfKaYZMHVE_q0/Core.roc ─

Encode.EncoderFormatting was imported here:

44│              EncoderFormatting,
                 ^^^^^^^^^^^^^^^^^

All types from builtins are automatically exposed, so you can remove
EncoderFormatting from the exposing list.

Tip: Learn more about builtins in the tutorial: 
<https://www.roc-lang.org/tutorial#builtin-modules>

── UNUSED IMPORT in ....0/xuaMzXRVG_SEhOFZucS3iBozlRdObWsfKaYZMHVE_q0/Core.roc ─

Encode.Encoder is not used in this module.

43│              Encoder,
                 ^^^^^^^

Since Encode.Encoder isn't used, you don't need to import it.

────────────────────────────────────────────────────────────────────────────────

0 errors and 4 warnings found in 483 ms
 while successfully building:

    ./examples/Json/main

I'll make a PR

Anton-4 commented 5 months ago

Oops, looks like we already had a PR https://github.com/lukewilliamboswell/roc-json/pull/25

Anton-4 commented 5 months ago

Luke's on vacation so I made a temporary patch release.

Anton-4 commented 5 months ago

Resolved with 0.8.0 release