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

Annotate-flows breaks factorio in uberjar #161

Open
dimmyjr-nu opened this issue Nov 25, 2021 · 0 comments
Open

Annotate-flows breaks factorio in uberjar #161

dimmyjr-nu opened this issue Nov 25, 2021 · 0 comments

Comments

@dimmyjr-nu
Copy link
Contributor

Since version 5.13.2, the factory started to break in uberjar. BC changed the way to generate bytecode, and we have this error for example

  • Remembering that factorio uses state-flow in its code
Syntax error compiling fn* at (factorio/recipes/cc_financing_br.clj:67:5).
Syntax error (IOException) compiling fn* at (factorio/recipes/cc_financing_br.clj:67:5).
File name too long

error log

With this version, in the uberjar try generate file like this:

target/classes/factorio/recipes/customer_br$customer_with_active_credit_card$fn__91515$fn__91516$fn__91517$fn__91519$fn__91522$fn__91525$fn__91528$fn__91530$fn__91531$fn__91532$fn__91533$fn__91534$fn__91535$fn__91536$fn__91537$fn__91538$fn__91539$fn__91540$fn__91541$fn__91542

With the previous version (5.13.1) in the uberjar generate like this:

customer_br$customer_with_active_credit_card
customer_br$customer_with_active_credit_card$fn__91927
customer_br$customer_with_active_credit_card$fn__91927$fn__91928
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933$fn__91936
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933$fn__91936$fn__91939
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933$fn__91936$fn__91939$fn__91941
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933$fn__91936$fn__91939$fn__91941$fn__91942
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933$fn__91936$fn__91939$fn__91941$fn__91942$fn__91943
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933$fn__91936$fn__91939$fn__91941$fn__91942$fn__91943$fn__91944
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933$fn__91936$fn__91939$fn__91941$fn__91942$fn__91943$fn__91944$fn__91945
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933$fn__91936$fn__91939$fn__91941$fn__91942$fn__91943$fn__91944$fn__91945$fn__91946
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933$fn__91936$fn__91939$fn__91941$fn__91942$fn__91943$fn__91944$fn__91945$fn__91950
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933$fn__91936$fn__91939$fn__91941$fn__91942$fn__91943$fn__91944$fn__91945$fn__91950$fn__91951
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933$fn__91936$fn__91939$fn__91941$fn__91942$fn__91943$fn__91944$fn__91945$fn__91957
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933$fn__91936$fn__91939$fn__91941$fn__91942$fn__91943$fn__91944$fn__91945$fn__91961
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933$fn__91936$fn__91939$fn__91941$fn__91942$fn__91943$fn__91944$fn__91945$fn__91961$fn__91962
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933$fn__91936$fn__91939$fn__91941$fn__91942$fn__91943$fn__91944$fn__91945$fn__91968
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933$fn__91936$fn__91939$fn__91941$fn__91942$fn__91943$fn__91944$fn__91945$fn__91968$fn__91969
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933$fn__91936$fn__91939$fn__91941$fn__91942$fn__91943$fn__91944$fn__91945$fn__91968$fn__91969$fn__91970
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91930$fn__91933$fn__91936$fn__91939$fn__91941$fn__91942$fn__91943$fn__91976
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91985
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91985$fn__91986
customer_br$customer_with_active_credit_card$fn__91927$fn__91928$fn__91985$fn__91986$fn__91987

We found the changes was the function annotate-with-line-meta in ns state-flow.core call by flow* PR

We tried with this approach, adding conditional for call or not this function, and worked.

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