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

Is this library production ready for CLJS? #22

Closed
rlhk opened this issue Mar 27, 2023 · 7 comments
Closed

Is this library production ready for CLJS? #22

rlhk opened this issue Mar 27, 2023 · 7 comments

Comments

@rlhk
Copy link

rlhk commented Mar 27, 2023

I'm trying to use the library for a shadow-cljs project. Believe I've got (:require-macros ... correct, but got a lot of warning like:

------ WARNING #2 - :undeclared-var --------------------------------------------
 Resource: tupelo/core.cljc:403:54
 Use of undeclared Var tupelo.core/Character
--------------------------------------------------------------------------------
...

And there are codes marked fix for CLJS related to error outputs.

If it's not ready for CLJS, it'd be good to mention in the readme.

Or do I miss anything?

@catalan42
Copy link
Collaborator

catalan42 commented Mar 28, 2023 via email

@cloojure
Copy link
Owner

I went through the code and made sure I could compile and run all the unit tests using shadow-cljs. Could you please let me know if the new version is OK for you? It is

23.03.28-SNAPSHOT

Thanks,
Alan

@rlhk
Copy link
Author

rlhk commented Mar 30, 2023

Hi Alan, thanks for your effort!

I just tested and got a different (kind of) error this time:
The required namespace "tupelo.core" is not available, it was required by "config.cljs".

You could reproduce it by checking out this branch of my logseq plugin project: https://github.com/rlhk/logseq-url-plus/tree/tupelo-test
It uses Babashka. So running bb build-cljs shall reveal the above error.

Specifically the commit causing the issue is:
rlhk/logseq-url-plus@12a9ac4

Not sure if I don't get macro setup correct in the cljs file ...

@cloojure
Copy link
Owner

Shadow-cljs test results (nodejs backend)

~/tupelo > go-test-node-once.bash 
rm -rf out public/js

clojure -M:shadow-cljs compile test-node  # v2 using deps.edn
[:test-node] Compiling ...
========= Running Tests =======================
no "source-map-support" (run "npm install source-map-support --save-dev" to get it)

Testing tst.aaa-bootstrap


---------------------------
   ClojureScript 1.11.60
---------------------------

Testing tst.tupelo.array

Testing tst.tupelo.array.mutable

Testing tst.tupelo.chars

Testing tst.tupelo.core

Testing tst.tupelo.interval

Testing tst.tupelo.lazy

Testing tst.tupelo.lexical

Testing tst.tupelo.math

Testing tst.tupelo.misc

Testing tst.tupelo.parse

Testing tst.tupelo.schema

Testing tst.tupelo.set

Testing tst.tupelo.string

Testing tst.tupelo.string.safe

Testing tst.tupelo.tagval

Testing tst.tupelo.vec

Ran 182 tests containing 2202 assertions.
0 failures, 0 errors.
===============================================
[:test-node] Build completed. (125 files, 1 compiled, 0 warnings, 7.16s)

I have not tried using it with Babashka yet, although that is on the todo list. I'll look into your example for logseq.

Alan

@RolT
Copy link

RolT commented May 9, 2023

I had the same error with 23.03.28-SNAPSHOT (tupelo.core not available) but the more recent 23.03.17 is working fine and removed all the warnings in cljs under shadow-cljs. I assume this version number was a mistake ?

Thanks !

@catalan42
Copy link
Collaborator

catalan42 commented May 10, 2023 via email

@cloojure
Copy link
Owner

Let me know if anything else crops up!
Alan

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

4 participants