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

Metadata doesn't respect current :align #57

Open
camsaul opened this issue Sep 1, 2022 · 0 comments
Open

Metadata doesn't respect current :align #57

camsaul opened this issue Sep 1, 2022 · 0 comments

Comments

@camsaul
Copy link

camsaul commented Sep 1, 2022

I was playing around with writing a custom printer for debug logging. My document looks something like

[:group
 (when ns-symb
   [:span
    ns-symb
    [:text " "]])
 (into [:align] forms)]

If I print this with :print-meta false things align the way I'd like:

honeysql2 Compiling Honey SQL 2 with options
          {:dialect :toucan2.test/current-db.dialect, :quoted true, :quoted-snake true}
honeysql2 => ["SELECT * FROM \"PEOPLE\" WHERE \"NAME\" = ?" "Cam"]
pipeline In
         toucan2.pipeline/transduce-execute with dispatch value
         [:toucan.query-type/select.instances :toucan2.test/people :toucan.map-backend/honeysql2]
pipeline Execute ["SELECT * FROM \"PEOPLE\" WHERE \"NAME\" = ?" "Cam"]

However if I enable :print-meta anything with metadata is printed at the beginning of the line, not respecting the :indent:

honeysql2 Compiling Honey SQL 2 with options
          {:dialect :toucan2.test/current-db.dialect, :quoted true, :quoted-snake true}
honeysql2 => ["SELECT * FROM \"PEOPLE\" WHERE \"NAME\" = ?" "Cam"]
pipeline In
         toucan2.pipeline/transduce-execute with dispatch value
         [:toucan.query-type/select.instances :toucan2.test/people :toucan.map-backend/honeysql2]
pipeline Execute
^{:type :toucan.map-backend/honeysql2, :toucan2.pipeline/parsed-args {}}
["SELECT * FROM \"PEOPLE\" WHERE \"NAME\" = ?" "Cam"]

Not sure if it makes a difference but I was using the colorized printer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant