Page 2 of 3

Re: The compiler is not ready

Posted: Thu Feb 27, 2025 10:15 pm
by Randy Walker
BarryG wrote: Thu Feb 27, 2025 1:08 pm Sorry Randy, I was wrong; it's a debugger timeout setting, not a compiler timeout. Been a while since I set it.
Yeah. Only timeout I could find in there was this:
"StartupTimeout = 10000"
That was under the [Debugger] header.

Re: The compiler is not ready

Posted: Fri Feb 28, 2025 2:40 am
by moricode
NicTheQuick wrote: Thu Feb 27, 2025 11:29 am
moricode wrote: Thu Feb 27, 2025 4:45 amwhat is in the behind mechanism and why we need to load compiler every time we open IDE ?
Without loading the compiler the IDE can not give proper syntax highlighting or recognize certain library functions, if I remember that right. So the compiler is used to retrieve information about all the available library functions because they are varying from version to version.
If only needed for syntax highlighting or recognize certain library functions, it is best to separate from compiler binary , it is IDE/RDE feature , not a compiler things.

just look at other IDE(code block/VS code) , they don't load compiler, compiler only use when building binary's.

Re: The compiler is not ready

Posted: Fri Feb 28, 2025 2:56 am
by Randy Walker
moricode wrote: Thu Feb 27, 2025 4:45 am what is in the behind mechanism and why we need to load compiler every time we open IDE ?
I don't open the IDE unless I intend to run code so I always need the compiler.
Honestly, How many use the PB IDE as their preferred text editor?

Re: The compiler is not ready

Posted: Fri Feb 28, 2025 3:00 am
by Randy Walker
IDE is the Integrated Development Environment, an application that makes programming easier!
"compiler not ready" is not easier.

Re: The compiler is not ready

Posted: Fri Feb 28, 2025 4:44 am
by moricode
Randy Walker wrote: Fri Feb 28, 2025 2:56 am
moricode wrote: Thu Feb 27, 2025 4:45 am what is in the behind mechanism and why we need to load compiler every time we open IDE ?
I don't open the IDE unless I intend to run code so I always need the compiler.
Honestly, How many use the PB IDE as their preferred text editor?
If you look inside more PB IDE design , it load compiler when open IDE , and then load again compiler when you run code .
it load twice !

so what i mean it is unnecessary to load when open , only load when run , like other IDE (VS Code) only load when run.

look carefully.

Re: The compiler is not ready

Posted: Fri Feb 28, 2025 4:55 am
by AZJIO
moricode wrote: Fri Feb 28, 2025 4:44 am and then load again compiler when you run code
Compilation of the source code is not the opening of the compiler.

Re: The compiler is not ready

Posted: Fri Feb 28, 2025 5:06 am
by moricode
AZJIO wrote: Fri Feb 28, 2025 4:55 am
moricode wrote: Fri Feb 28, 2025 4:44 am and then load again compiler when you run code
Compilation of the source code is not the opening of the compiler.
so , we do not need opening compiler when open IDE .

we only need load syntax color rule and load load library function name , then the IDE is working perfectly , why need to load whole giant compiler ?
compiler only need for compilation , no need for editing.

Re: The compiler is not ready

Posted: Fri Feb 28, 2025 5:38 am
by Randy Walker
moricode wrote: Fri Feb 28, 2025 5:06 am why need to load whole giant compiler ?
compiler only need for compilation , no need for editing.
Giant?!
My copy of PureBasic562.exe is 4,851KB
The companion pbcompiler.exe is only 594KB -- Small compared.
Where do you get "Giant" from? For what it does I would say that is tiny.

Re: The compiler is not ready

Posted: Fri Feb 28, 2025 5:40 am
by Randy Walker
Much chatter about nothing and no solution for the condition.
Anybody know a solution?

Re: The compiler is not ready

Posted: Fri Feb 28, 2025 5:52 am
by AZJIO
moricode wrote: Fri Feb 28, 2025 5:06 am why need to load
It was clear on the previous page

https://www.purebasic.fr/english/viewto ... 44#p629744

Re: The compiler is not ready

Posted: Fri Feb 28, 2025 10:39 am
by NicTheQuick
moricode wrote: Fri Feb 28, 2025 2:40 am If only needed for syntax highlighting or recognize certain library functions, it is best to separate from compiler binary , it is IDE/RDE feature , not a compiler things.

just look at other IDE(code block/VS code) , they don't load compiler, compiler only use when building binary's.
That's not correct. VSCode also loads compilers or interpreters in the background on certain languages. For example on Python. Without knowing what exact version and virtual environment of Python to load VSCode does not know which modules are available.

Re: The compiler is not ready

Posted: Fri Feb 28, 2025 10:58 am
by moricode
NicTheQuick wrote: Fri Feb 28, 2025 10:39 am
That's not correct. VSCode also loads compilers or interpreters in the background on certain languages. For example on Python. Without knowing what exact version and virtual environment of Python to load VSCode does not know which modules are available.
but, but , but PureBasic is NOT Python , we do not follow Python route , PB is more advance , or easier , ahem , more simpler , or any thing else , the IDE of version 5.6 only manage syntax in version 5.6 , nothing unknown to IDE.

Re: The compiler is not ready

Posted: Fri Feb 28, 2025 4:33 pm
by ChrisR
moricode wrote: Fri Feb 28, 2025 5:06 am so , we do not need opening compiler when open IDE .

we only need load syntax color rule and load load library function name , then the IDE is working perfectly , why need to load whole giant compiler ?
compiler only need for compilation , no need for editing.
The compiler is used at startup to communicate with the IDE, passing on information that the IDE does not have, such as the list of functions...
When the IDE is started, it is launched with: pbcompiler.exe /STANDBY /LANGUAGE English

It is possible to do this in cmd:

Code: Select all

pbcompiler.exe /STANDBY /LANGUAGE English
It will answer
STARTING 6.20 PureBasic 6.20 (Windows - x64)
READY
Once ready you can write, for example FUNCTIONLIST and return. It will enumerate the list of functions:
FUNCTIONLIST
1816
AbortFTPFile (#Ftp) - Abort the current asyncrhonous file operation.
AbortHTTP ..........
Crtl+C to close it


#
Otherwise, I've never encountered the “compiler is not ready” message before, but now I get it when I start the IDE, it's pretty annoying to have to restart it.
I don't know if it has anything to do with Pb 6.20 Install but it's about the same time.

I tested in cmd, the time for the compiler to be ready and indeed, it is quite long the first time

Code: Select all

C:\Program Files\PureBasic\Compilers>Echo %Time% Ctrl+C as soon as you see ready for the end time & pbcompiler.exe /STANDBY /LANGUAGE Francais & Call Echo ^%Time^%
16:31:17,82 Ctrl+C as soon as you see ready for the end time
STARTING        6.20    PureBasic 6.20 (Windows - x64)
READY
16:31:18,51

I searched a little, the maximum delay seems to be 15s to WaitForCompilerReady() in CompilerInterface.pb

Code: Select all

Timeout.q = ElapsedMilliseconds() + 15000 ; just for safety
    
While AvailableProgramOutput(CompilerProgram) = 0 And ElapsedMilliseconds() < Timeout
It would be a good idea to have this delay in the compiler settings, but well, no idea why it takes longer than 15s sometimes here, now.

Re: The compiler is not ready

Posted: Fri Feb 28, 2025 4:55 pm
by Randy Walker
ChrisR wrote: Fri Feb 28, 2025 4:33 pm I don't know if it has anything to do with Pb 6.20 Install but it's about the same time.
I have 5.62 and 6.20 installed and both give me the same message and require me to do the manual [Restart compiler] option.
6.20 was last one installed.

Re: The compiler is not ready

Posted: Sat Mar 01, 2025 3:49 am
by moricode
ChrisR wrote: Fri Feb 28, 2025 4:33 pm
The compiler is used at startup to communicate with the IDE, passing on information that the IDE does not have, such as the list of functions...
When the IDE is started, it is launched with: pbcompiler.exe /STANDBY /LANGUAGE English

It is possible to do this in cmd:

Code: Select all

pbcompiler.exe /STANDBY /LANGUAGE English
It will answer
STARTING 6.20 PureBasic 6.20 (Windows - x64)
READY
Once ready you can write, for example FUNCTIONLIST and return. It will enumerate the list of functions:
FUNCTIONLIST
1816
AbortFTPFile (#Ftp) - Abort the current asyncrhonous file operation.
AbortHTTP ..........
Crtl+C to close it
If the purpose of starting the compiler in standby mode only communicate to IDE and give the IDE FUNCTIONLIST , why would the "ver 6 IDE" or the "author of ver 6 IDE" and realease of "ver 6 IDE" in "ver 6 Purebasic" , doesn't know about the "ver 6 FUNCTIONLIST " ?

Just put the FUNCTIONLIST in a .ini file or something , the IDE will know, then no need to load compiler when using IDE.

Why make things complicated ?