You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just downloaded Frege REPL 1.2.1-SNAPSHOT, and changed the fregei shell script so that it uses frege3.22.525-g704b834.jar.
However, the version displayed is still 424:
ingo@freguntu:/tmp$ frepl # just alias to fregei
/home/ingo/bin/java
Welcome to Frege 3.22.524-gcc99d7e (Oracle Corporation Java HotSpot(TM) 64-Bit Server VM, 1.8.0_40)
frege> :version
3.22.524-gcc99d7e
frege> 10-2*3
4
But because it outputs the correct result from the expression (instead 24) means that it actually uses the 525 jar.
I think it would be better to report the actual version from frege.Version. For, when we get a bug report, it'll be hard to establish which frege jar is actually used otherwise.
The text was updated successfully, but these errors were encountered:
REPL does read version from frege.Version.version but the problem seems to be that since it is a constant on the Version module, Java compiler is basically inlining the constant value in FregeRepl module. Thus it ends up as a constant in the class file and it doesn't use Version.version at runtime.
This is clear from the bytecode of FregeRepl module:
javap -cp "./lib/*" -verbose frege.repl.FregeRepl | less
The StackOverflow threads, this and this, touch upon this problem and the solution seems to be adding an intern() call on the version string so that the compiler doesn't inline the constant.
I just downloaded Frege REPL 1.2.1-SNAPSHOT, and changed the fregei shell script so that it uses frege3.22.525-g704b834.jar.
However, the version displayed is still 424:
But because it outputs the correct result from the expression (instead 24) means that it actually uses the 525 jar.
I think it would be better to report the actual version from
frege.Version
. For, when we get a bug report, it'll be hard to establish which frege jar is actually used otherwise.The text was updated successfully, but these errors were encountered: