Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345070 - modules to be searched
Summary: modules to be searched
Status: NEW
Alias: None
Product: PTP
Classification: Tools
Component: Photran.Refactoring Engine (show other bugs)
Version: 8.0.2   Edit
Hardware: PC Linux
: P4 major (vote)
Target Milestone: ---   Edit
Assignee: Photran Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-08 05:01 EDT by Daniel Harenberg CLA
Modified: 2016-02-24 12:58 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Harenberg CLA 2011-05-08 05:01:48 EDT
Problem: cannot choose folders to be searched for modules outside of current workspace. Same for folders to be searched for include files.

To reproduce: create a workspace. Create a project. Open Project Properties -> Fortran General -> Analysis/Refactoring and click 'New' next to either one of the two empty boxes. Try to navigate to a location outside the current workspace: this is not possible.

More Info: as far as I can tell, all modules in the current project are already indexed/searched by the analysis/refactoring - even if they reside in subdirectories of the current project. So at the moment, these two boxes (folders to be searched for modules/include files) seem only to be useful if I want to include modules from other projects within the same workspace. In my case that never happens (so these boxes don't help at all), but others might have this scenario. However, a much more common scenario seems to be that external libraries are used in the project (e.g. LAPCAK), which reside somewhere different in the file system. At the moment, the indexer complains 'There are no files that export a module named XXX', because one can't point to those workspace-external libraries.

My guess is that this is easy to fix, and important since it should be a common impediment to refactoring.
Comment 1 Jeffrey Overbey CLA 2012-03-01 11:07:14 EST
Hi Daniel,

When the modules reside elsewhere in the file system, do you typically have source code available for the module?

Photran isn't able to read .mod files, since the file format varies from compiler to compiler.  We omitted the ability to add non-workspace paths since we didn't expect source code to be available for system-wide modules.  If source code *is* available, then, yes, this wouldn't be too hard to add.

I suppose it would also be possible to find .mod files and treat them as a black box -- we know the module exists, but we don't know what's in it -- although I'm not sure how helpful that would be... it would only serve to eliminate the error messages...
Comment 2 Daniel Harenberg CLA 2012-03-03 08:53:34 EST
(In reply to comment #1)
Hi Jeff,

I would expect numerical packages - like BLAS, LAPACK, or commercial ones like IMSL- to reside outside a particular workspace. However, I am not a software engineer or anything related and do not have much experience. BLAS and LAPACK (widely used I believe) are open source, whereas IMSL is not, but maybe IMSL provides the source code for the interfaces.

It's been a while since I reported this, so I don't remember the details, but I believe that the reason I opened this bug was that if the indexer can't find all modules (so that the error message appears), then one can't use any of the refactorings. In that case, it would suffice to treat .mod files as a black box - the indexer simply needs to understand that this is a user-supplied module, so that the error message won't appear and I can proceed with using refactorings.
Comment 3 Daniel Harenberg CLA 2012-10-03 09:53:16 EDT
Problem still there in Eclipse Juno, PTP 6.0.2/Photran 8.0.2.

The View 'Photran Analysis/Refactoring Problems' contains several items saying 'There are no files that export a module named xxxx'. One example is ieee_arithmetic, which is an extension in the Intel Compiler, other examples are MKL (math kernel library) or LAPACK modules.
Comment 4 Kei M. CLA 2016-02-24 12:58:47 EST
Hi, 

Found this ancient report but nothing seems to have happened since then.
I have multiple external libraries outside of my workspace and still (Eclipse Mars.1 Release (4.5.1) / Photran 9.1.

Would it cause a big mess to include this feature? It would help me a lot. Also, for large projects, it's not uncommon to have files and folders placed outside one's workspace.

Thanks a lot for your help. It's highly appreciated.

Very best,

Kei