#250 A file inclued not in +incdir+ directories

open
nobody
None
5
2013-03-23
2013-03-22
No

Recently, I started to use SVEditor for my project.

I created two projects A and B from another Mercurial repositories MA and MB.

I just wanted to merge B to A. MB was a subset of MA, and I wanted to use diff tool in Eclipse.

When I opened a file in project A, I saw too many errors in my code. Many errors was related to defined variables. It only found some of all defined variables.

I used 'Open Declaration' command on a found defined variable.
It opened defs.v. However it was not located in 'A/include'.
Strangely, file editor showed 'MB/defs.v' in title bar.

  • There was no 'defs.v' file in project B. (Because it was not managed by Mercurial.)
  • There was no relationship between A, B, MA, and MB in filesystem. (no link, not same directory)
  • I added vcode.f in Argument Files property. However there was no blue dot at defs.v in project A.
  • MB was not managed by Eclipse. I seached directory name of MB, and there was only one file have such directory name. (.\workspace.metadata.plugins\org.eclipse.core.runtime.settings\com.vectrace.MercurialEclipse.prefs)

After deleting 'defs.v' file in MB directory, SVEditor could find defs.v properly.

I don't know what made this problem, they might be MercurialEclipse or Eclipse itself.
However I didn't encounter such problem before, as I'm using Eclipse and MercurialEclipse for longtime as C and JAVA IDE.

Files in MA:
vcode.f (didn't managed by Mercurial, it has +incdir+./include)
include/defs.v (managed by Mercuial)
myfolders_*/mycodes_*.v (managed by Mercuial)

Files in MB:
mycodes_*.v (managed by Mercurial)
defs.v (didn't managed by Mercurial, and a subset of defs.v in MA)

Related

Bugs: #250

Discussion

  • Matthew Ballance

    I'm not entirely sure what is happening here, but would be happy to look at a testcase.

    One thing to be aware of is that Open Declaration and the parser use different information sets in order to do their jobs. The parser is very strict about flagging an error on missing defines if the file containing the define reference does not include the file setting up the defines, and is not included by another file that SVEditor does manage that sets up the defines. Open Declaration and content assist are slightly more relaxed, and perform a global search in the indexes for the project that contains the file.

     
  • Erik Jessen

    Erik Jessen - 2013-03-23

    Matt,
    When debugging really big projects, sometimes search order can be important - if there's duplicate filenames.
    It would be useful if there was a way to get SVE to report:
    1) final list of incdir and -y (in order that SVE searches)
    2) the full filepath for each file loaded (sometimes the only way to figure it out, if a mix of -y and +incdir+ do some sort of nested nightmare: a module includes a file which references a module whichincludes another file which... Anyways - you get the idea.

    And if both were computer-readable, we could also use them for unit-testing.

    I've also seen people construct the filename for a include using multipledefines and `ifdefs.

    include ``FILE_PREFIXFILE_SEPARATOR.`FILE_SUFFIX

    so having a way to show the files after macro expansion would be pretty useful for debug as well - sometimes those defines are in multiple files withifdefs.

    Erik
    From: Matthew Ballance [mailto:mballance@users.sf.net]
    Sent: Saturday, March 23, 2013 1:01 PM
    To: [sveditor:bugs]
    Subject: [sveditor:bugs] #250 A file inclued not in +incdir+ directories

    I'm not entirely sure what is happening here, but would be happy to look at a testcase.

    One thing to be aware of is that Open Declaration and the parser use different information sets in order to do their jobs. The parser is very strict about flagging an error on missing defines if the file containing the define reference does not include the file setting up the defines, and is not included by another file that SVEditor does manage that sets up the defines. Open Declaration and content assist are slightly more relaxed, and perform a global search in the indexes for the project that contains the file.


    [bugs:#250]http://sourceforge.net/p/sveditor/bugs/250/ A file inclued not in +incdir+ directories

    Status: open
    Created: Fri Mar 22, 2013 01:57 PM UTC by Maurice Ravel
    Last Updated: Fri Mar 22, 2013 01:57 PM UTC
    Owner: nobody

    Recently, I started to use SVEditor for my project.

    I created two projects A and B from another Mercurial repositories MA and MB.

    I just wanted to merge B to A. MB was a subset of MA, and I wanted to use diff tool in Eclipse.

    When I opened a file in project A, I saw too many errors in my code. Many errors was related to defined variables. It only found some of all defined variables.

    I used 'Open Declaration' command on a found defined variable.
    It opened defs.v. However it was not located in 'A/include'.
    Strangely, file editor showed 'MB/defs.v' in title bar.

    • There was no 'defs.v' file in project B. (Because it was not managed by Mercurial.)
    • There was no relationship between A, B, MA, and MB in filesystem. (no link, not same directory)
    • I added vcode.f in Argument Files property. However there was no blue dot at defs.v in project A.
    • MB was not managed by Eclipse. I seached directory name of MB, and there was only one file have such directory name. (.\workspace.metadata.plugins\org.eclipse.core.runtime.settings\com.vectrace.MercurialEclipse.prefs)

    After deleting 'defs.v' file in MB directory, SVEditor could find defs.v properly.

    I don't know what made this problem, they might be MercurialEclipse or Eclipse itself.
    However I didn't encounter such problem before, as I'm using Eclipse and MercurialEclipse for longtime as C and JAVA IDE.

    Files in MA:
    vcode.f (didn't managed by Mercurial, it has +incdir+./include)
    include/defs.v (managed by Mercuial)
    myfolders_/mycodes_.v (managed by Mercuial)

    Files in MB:
    mycodes_*.v (managed by Mercurial)
    defs.v (didn't managed by Mercurial, and a subset of defs.v in MA)


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/sveditor/bugs/250/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/prefs/


    This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.

     

    Related

    Bugs: #250

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks