Is it necessary to compile. p where the respective .i file has new changes? but it will not impact program running.
In this case just copy the latest .i file to respective directory is fine?
Is it necessary to compile. p where the respective .i file has new changes? but it will not impact program running.
In this case just copy the latest .i file to respective directory is fine?
It depends, mostly on whether you are running compiled r-code. The simplest answer: if there is a file name .r the same folder*, then you are running compiled code and you will need to compile first. If not, you are likely to be running of source, and the AVM will run off the source code, compiling on-the-fly as needed.
There's a bunch of information available in the doc .
If you want a compiled (dot-r) program to incorporate the coding changes in a dot-i that the source dot-p references then, yes, you must recompile the dot-p.
Take these two files for example:
/* test.p
*/
message "dot-p, first statement".
{include.i}
/* include.i
*/
message "some code in include include.i"
When you compile test.p it incorporates include.i as it exists at that moment. I.e.:
compile test.p save.
run test.p. /* you can run either the .p or the .r, if a .r exists it will be used */
If you then later change include.i, none of the changes are known to the dot-r until you recompile. So, after compiling as shown above, modify include.i. Then just RUN test.p again without recompiling. Your changes are not incorporated. Now both COMPILE and RUN again and your changes are seen.
If you're sure the change has no impact, e.g. if you only changed a comment, recompile is not strictly required.
I would advise against not recompiling because stack traces can point to the wrong line of code. If you use the debugger it will indicate your rcode is not up to date. The profiler can also report wrong line numbers.
So while you may get away without a compile, I cannot recommend skipping the compile step.
If the change has no impact, and you're unable to compile now, then maybe it is better to not change the include.