state-flow
state-flow copied to clipboard
Annotate-flows breaks factorio in uberjar
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
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.