Skip to content
Commit 8ef25936 authored by Philipp Weber's avatar Philipp Weber
Browse files

Fix: Remove requiring isis itself from ciao routine

parent 33c04db8
Loading
Loading
Loading
Loading
Loading
  • Owner

    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

  • Author Maintainer

    Before this patch the require was in a preprocessor directive in the file mentioned above, this is true, but when the isisscripts are built all requires are pulled out and put on to of ipsisscripts.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 named isis.sl in the current working directory to be loaded as soon as you do

    require("isisscripts");
  • Owner

    Ah, I see. Thanks!

  • Author Maintainer

    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 all requires in the isisscripts. I guess this exact case with isis.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.

  • Owner

    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.

  • Philipp Weber @weber

    mentioned in issue #19

    ·

    mentioned in issue #19

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment