@Alek101 I don’t know if I can answer all your questions, but check out this tool @pfreitag wrote a while back
is there a rules of how to write a code so there won’t be problems in productions?
Not really. While a few people do this, it’s not really documented and there is no way to automated it very well (outside of the module above) Lucee’s “official” stance on it is to hit the file and then go copy it out of the cfclasses folder. The main issue is Lucee’s bytecode can change between versions, so if you are deploying Lucee
x.y.z.q then the class files MUST ALSO have been compiled by Lucee
Like is it mandatory to compile entire app, or it could be done on part of it? Can it compile a single file?
You can compile a single file or the entire app, but it creates a class file for each cfm or cfc.
It’s worth noting, you can pre-compile a “lar” file and then specify that file as a CF Mapping, so all the paths to
/myMapping/* would map to the code in an existing .lar file. The huge draw back to this is there is no way to create these outside of manual interaction with the Lucee web admin. And furthermore, I don’t think it works to compile the entire web root and then point it to the
/ mapping. At least, I had issues the last time I tried. The Lucee admin is deployed like this FWIW.
Why some times when there is mix of compiled and uncompiled application is working, and sometimes it is crushing?
I have no idea what this means. You’ll need to be more specific and provide the actual setup and error you’re getting.
Can you replace single compiled file with uncompiled?
I think, yes.
Can files or folders be with capital letters or not?
I’m not sure what you mean, but I assume the capitalization of the files doesn’t matter so long as you keep the class files with whatever name Lucee generated for them.
Can files start with numbers?
I can’t imagine why not. Did you try? Did you have an issue?
Why it is adding _ before file that starts with number during compellation?
Who knows. Is it causing an issue?