Skip to content

Commit

Permalink
chore: upgrade gleam version
Browse files Browse the repository at this point in the history
  • Loading branch information
cdaringe committed Apr 14, 2024
1 parent b32fe23 commit 3cb9480
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: erlef/setup-beam@v1
with:
otp-version: "26.0.2"
gleam-version: "0.34.0"
gleam-version: "1.1.0-rc3"
rebar3-version: "3"
# elixir-version: "1.15.4"
- run: gleam deps download
Expand Down
2 changes: 1 addition & 1 deletion src/ast.gleam
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import evil.{expect}
import gleam/list
import gleam/string
import request.{type Request}
import evil.{expect}

pub fn get_import_path_from_mod_name(module_str: String, req: Request) {
list.find_map(in: req.module.imports, with: fn(imp) {
Expand Down
2 changes: 1 addition & 1 deletion src/common.gleam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import justin
import gleam/string
import justin

pub fn decoder_name_of_t(raw_name: String) -> String {
let snake_name = justin.snake_case(raw_name)
Expand Down
26 changes: 13 additions & 13 deletions src/gserde.gleam
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import dot_env/env
import evil.{expect}
import fswalk
import glance
import gleam/bool
import gleam/io
import gleam/list
import gleam/bool
import gleam/string
import gleam/result
import glance
import internal/serializer
import dot_env/env
import gleam/string
import internal/deserializer
import simplifile
import internal/serializer
import request.{type Request, Request}
import fswalk
import evil.{expect}
import simplifile

pub fn gen(req: Request) {
let ser =
Expand Down Expand Up @@ -106,11 +106,11 @@ pub fn process_single(src_filename: String, is_debug) {
simplifile.write(
to: dest_filename,
contents: [
"import gleam/json",
"import gleam/dynamic",
"import " <> src_module_name,
filecontent,
]
"import gleam/json",
"import gleam/dynamic",
"import " <> src_module_name,
filecontent,
]
|> string.join("\n"),
)
|> result.unwrap(Nil)
Expand Down
4 changes: 2 additions & 2 deletions src/internal/codegen/modules.gleam
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import gleam/list
import gleam/string
import gleam/set
import internal/codegen/types.{type GleamType} as t
import gleam/string
import internal/codegen/statements.{type GleamStatement} as gens
import internal/codegen/types.{type GleamType} as t

pub type Mod {
Mod(
Expand Down
2 changes: 1 addition & 1 deletion src/internal/codegen/statements.gleam
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import gleam/int.{to_string as to_s}
import gleam/option.{type Option, None, Some}
import gleam/list.{map}
import gleam/option.{type Option, None, Some}
import gleam/string.{join}
import internal/codegen/types.{type GleamType} as t

Expand Down
16 changes: 8 additions & 8 deletions src/internal/deserializer.gleam
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import common.{decoder_name_of_t}
import evil.{expect}
import glance
import internal/codegen/statements as gens
import internal/codegen/types as t
import gleam/string
import gleam/int
import gleam/io
import gleam/list
import gleam/option
import gleam/io
import gleam/int
import request.{type Request, Request}
import common.{decoder_name_of_t}
import gleam/string
import internal/codegen/statements as gens
import internal/codegen/types as t
import internal/path.{basename}
import evil.{expect}
import request.{type Request, Request}

fn quote(str) {
"\"" <> str <> "\""
Expand Down
2 changes: 1 addition & 1 deletion src/internal/path.gleam
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import gleam/string
import gleam/list
import gleam/result
import gleam/string

pub fn basename(path: String) {
string.split(path, on: "/")
Expand Down
14 changes: 7 additions & 7 deletions src/internal/serializer.gleam
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import ast.{get_import_path_from_mod_name}
import evil.{expect}
import glance
import internal/codegen/statements as gens
import internal/codegen/modules as genm
import internal/codegen/types as t
import gleam/string
import gleam/int
import gleam/list
import gleam/option.{None, Some}
import gleam/int
import ast.{get_import_path_from_mod_name}
import request.{Request}
import gleam/string
import internal/codegen/modules as genm
import internal/codegen/statements as gens
import internal/codegen/types as t
import internal/path.{basename}
import request.{Request}

type StmtGenReq {
Stmt(t: t.GleamType, module_path: String, imports: List(String))
Expand Down
6 changes: 3 additions & 3 deletions test/gserde_test.gleam
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import gleam/list
import gleam/string
import gleeunit
import gleeunit/should
import simplifile
import gleam/string
import gleam/list
import shellout
import simplifile

pub fn main() {
gleeunit.main()
Expand Down

0 comments on commit 3cb9480

Please sign in to comment.