Fix: Remove requiring isis itself from ciao routine
-
I don't understand this... Why was this a problem? It is guarded by a pre-processor conditional, so it should not be loaded anyway when within isis. Also, I have not found any isis.sl in any of the load paths, so this definitely does not get loaded when starting isis.
And I can also not reproduce it... Having a file isis.sl in my pwd and running isis (with or without isisscripts loaded) does not load isis.sl
-
Before this patch the
require
was in a preprocessor directive in the file mentioned above, this is true, but when the isisscripts are built allrequire
s are pulled out and put on to ofipsisscripts.sl
and executed every time the isisscripts are loaded:try {require("isis");} catch AnyError: {;};
This, in combination with
"."
in the load path (#18 (closed)), causes any file namedisis.sl
in the current working directory to be loaded as soon as you dorequire("isisscripts");
-
Of course this is a matter of debate. This would not have been an issue if #18 (closed) wouldn't exist. But as long as this is not resolved the problem remains for any
.sl
file and allrequire
s in the isisscripts. I guess this exact case withisis.sl
was just to risky, but in theory it can still happen for all of these modules:try {require("fitswcs");} catch AnyError: {;}; try {require("gcontour");} catch AnyError: {;}; try {require("gsl","gsl");} catch AnyError: {;}; try {require("gslfft","gsl");} catch AnyError: {;}; try {require("gslinterp");} catch AnyError: {;}; try {require("histogram");} catch AnyError: {;}; try {require("pcre");} catch AnyError: {;}; try {require("pgplot");} catch AnyError: {;}; try {require("png");} catch AnyError: {;}; try {require("pvm_ms");} catch AnyError: {;}; try {require("rand");} catch AnyError: {;}; try {require("socket");} catch AnyError: {;}; try {require("stats");} catch AnyError: {;}; try {require("vector");} catch AnyError: {;}; try {require("wcsfuns");} catch AnyError: {;}; try {require("xfig");} catch AnyError: {;}; try {require("xspec");} catch AnyError: {;};
I think a proper fix would be to resolve #18 (closed) and make every user totally aware of how to load external files and make sure where they come from. But this is probably impossible.
-
I agree, as stated in #18 (closed) I was sure it is a remeis thing. I would also argue that "." should never be a default in a load path...
Maybe we should also change the catch AnyError to catch OpenError to get more sensible information if something else goes wrong.
-
mentioned in issue #19