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

squirrel generate a gleam file which import uneeded "gleam/list" #66

Closed
YievCkim opened this issue Feb 15, 2025 · 3 comments
Closed

squirrel generate a gleam file which import uneeded "gleam/list" #66

YievCkim opened this issue Feb 15, 2025 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@YievCkim
Copy link

YievCkim commented Feb 15, 2025

Hello !

everything is in title. It's not very disturbing it just generates a warning message. To reproduce you can use this:

https://codeberg.org/Mik000/keepup/src/commit/e22a8f97e4400a7730fc5f5fbbf3b3cbb4f15e9b

I removed the warning in sql.gleam but regenerates it with squirrel will rewrite it.

@giacomocavalieri giacomocavalieri added bug Something isn't working good first issue Good for newcomers labels Feb 15, 2025
@giacomocavalieri
Copy link
Owner

Oops looks like a codegen bug, we can definitely fix this! I'll look into it

@YievCkim
Copy link
Author

YievCkim commented Feb 15, 2025

I think it's because I have array type in PG. I give you the table schema:

CREATE TABLE IF NOT EXISTS public.tasks
(
    task_id integer NOT NULL DEFAULT nextval('tasks_task_id_seq'::regclass),
    title character varying(70) COLLATE pg_catalog."default" NOT NULL,
    description character varying[] COLLATE pg_catalog."default" NOT NULL DEFAULT ARRAY[]::character varying[],
    due_on timestamp without time zone NOT NULL,
    created_on timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
    done_on timestamp without time zone,
    CONSTRAINT tasks_pkey PRIMARY KEY (task_id)
)

@giacomocavalieri
Copy link
Owner

Hello! I just checked and this was actually fixed in #62 but I forgot to make a release! I'll make a new release today 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants