Forum > Pas2JS

which are the different parts of pas2JS and is the wiki page still up to date?

(1/3) > >>

prof7bit:
Which are the different parts of pas2JS and how are they related to each other?

The wiki page says I need to checkout the sources and when building it it will also build the pas2js compiler. However, when installing standard FPC it will also already install a pas2js compiler and Lazarus will try to use THAT by default.

Why are there 2 different compilers, why is a pas2js compiler maintained and distributed by the FPC team when I still need to checkout a different repo and build this same(?) compiler from there again?

Or can I omit this step and only build the additional stuff that has still not made its way into FPC?

Is the wiki page still up to date in this regard because it doesen't mention any of the pas2js parts that already come with FPC (and the reasons for them to be there). It is rather confusing.

Can anybody please give a detailed architectural top-down overview of all the parts that belong to it, how they play together, etc?





PierceNg:
On my Linux box, the version of pas2js that was built together with FPC:


--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---% /bin/pas2js -hPas2JS Compiler version 1.5.1 [2020/07/07] for Linux x86_64Copyright (c) 2019 Free Pascal team.
According to https://wiki.freepascal.org/Pas2JS_Version_Changes, currently released version is 2.0.6.

I happened to be running pas2js trunk on my machine:


--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---% pas2js -hPas2JS Compiler version 2.1.1 [2021/07/05] for Linux x86_64Copyright (c) 2021 Free Pascal team.
Bottomline easy answer, if you want to use current released version: Build v2.0.6 from source yourself. Ignore what comes with FPC.

prof7bit:

--- Quote from: PierceNg on October 24, 2021, 10:14:30 am ---Bottomline easy answer, if you want to use current released version: Build v2.0.6 from source yourself. Ignore what comes with FPC.

--- End quote ---
This is actually not an answer at all, it just reinforces the question. My FPC installation (main branch) comes with Pas2JS Compiler version 2.1.1 [2021/10/24] for Linux x86_64. Why this confusing redundancy? Why is an incomplete pas2js environment that cannot be used anyway because it is incomplete contained in the FPC install? is this a leftover? Or is it planned to move it all into FPC and the move is just not completed yet?

PierceNg:

--- Quote from: prof7bit on October 24, 2021, 10:19:07 am ---
--- Quote from: PierceNg on October 24, 2021, 10:14:30 am ---Bottomline easy answer, if you want to use current released version: Build v2.0.6 from source yourself. Ignore what comes with FPC.

--- End quote ---
This is actually not an answer at all, it just reinforces the question. My FPC installation (main branch) comes with Pas2JS Compiler version 2.1.1 [2021/10/24] for Linux x86_64.

--- End quote ---

If you are ok using pas2js 2.1.1, then you are all set.

pas2js is a Pascal transpiler written in Pascal, built using FPC. Once the transpiler is built, then just use it.

Oh ok you edited your post after I answered.

prof7bit:

--- Quote from: PierceNg on October 24, 2021, 10:34:28 am ---If you are ok using pas2js 2.1.1, then you are all set.

pas2js is a Pascal transpiler written in Pascal, built using FPC. Once the transpiler is built, then just use it.

--- End quote ---
I cannot use it, it is missing the rtl or whatever, it complains about missing unit system.

So the question remains: Why is there an incomplete pas2js environment contained in FPC (and why is it maintained at the most recent version of pas2js) when it is not meant to be used and instead one needs to install all the same stuff (plus some more) from a different repo separately again?

Maybe I am not expressing myself clearly enough, but I did not ask "what" or "how", I asked "why". Because I am trying to understand! Is here anybody who can actually answer this question?

Navigation

[0] Message Index

[#] Next page

Go to full version