v4.0.0 Absolute search paths made relative to other absolute

Beta Testing discussion on mikroPascal PRO for PIC32.
Post Reply
Author
Message
VCC
Posts: 463
Joined: 08 Jun 2009 18:31
Location: Romania

v4.0.0 Absolute search paths made relative to other absolute

#1 Post by VCC » 19 Feb 2019 07:28

Hi,

If the project contains source files from two different disk partitions (e.g. D and E), and the project is saved on one of them, then the search paths from the other partitions are made relative to the first one, resulting in a "1501" warning message.
The bug shows up after restarting the IDE (or reloading the project), then recompiling the project.
For example, if the project is saved in D:\mP32_400_BugReport\Bug1\ and it contains files from E:\mP32_400_BugReport\Bug1_Files, the IDE automatically adds the E:\mP32_400_BugReport\Bug1_Files path to search paths as relative paths.
After restarting the IDE and recompiling the project, it reports:
0 1501 Specified search path does not exist: 'D:\mP32_400_BugReport\Bug1\E:\mP32_400_BugReport\Bug1_Files'

Steps to reproduce:
1. Make sure you have the D:\mP32_400_BugReport\Bug1 folder structure on your disk.
2. Make sure no project is loaded, then go to menu -> Project -> New Project.
3. Select Standard Project, click Next.
4. Set project name to (without quotes) "Bug1Rep", set project folder to "D:\mP32_400_BugReport\Bug1\", set device name (e.g. P32MX270F256D). Click Next, Next, Finish.
5. If the Edit project window opens, close it for now.
6. Save the Bug1Rep.mpas file now. Also, save the project.
7. Open "D:\mP32_400_BugReport\Bug1\Bug1Rep.mpp32" with Notepad++ or other text editor, which can detect file changes on disk.
8. At this point, the [FILES] section from Bug1Rep.mpp32 says that there is one file. So far so good. Go back to the IDE, open Project Manager and expand the Sources folder. Bug1Rep.mpas should be there.
9. Make sure you have a valid mpas file in "E:\mP32_400_BugReport\Bug1_Files" folder, either saved previously or created just now, but with a different text editor. (let's call it e.g. Bug1.mpas)
10. Right-click the Sources folder from the Project Manager, and select "Add Existing File...". Browse to "E:\mP32_400_BugReport\Bug1_Files\Bug1.mpas" file. The new file appears in Project Manager.
11. Save the project. Go to Notepad++ (minimize and restore it to detect the file change on disk) and look at the [FILES] section. It contains the two source files of the project, but the new one has a ".\" in front of it.
[FILES]
File0=Bug1Rep.mpas
File1=.\E:\mP32_400_BugReport\Bug1_Files\Bug1.mpas

12. Compile the project. It should successfully compile. No warning about a wrong path should be given by now.
13. Close the IDE and reopen it. The project should automatically be loaded.
14. Compile the project. Notice the following message in the console:
0 1501 Specified search path does not exist: 'D:\mP32_400_BugReport\Bug1\E:\mP32_400_BugReport\Bug1_Files'

So it looks like the ".\" in front of the path, causes the path to be relative (to the project file).
15. Close the IDE again. From Notepad++, remove the ".\" part from ".\E:\mP32_400_BugReport\Bug1_Files\Bug1.mpas" path, under [FILES] section and save the file.
16. Open the IDE again. The project should automatically load. Compile the project again. No "1501" message is displayed in the console.

Thank you

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: v4.0.0 Absolute search paths made relative to other abso

#2 Post by filip.grujcic » 27 Feb 2019 09:28

Hi,

I've also replied in your other post regarding this: viewtopic.php?f=173&t=74224
I managed to reproduce both issues and I have forwarded them to our developers.
Thank you for reporting this to us.

Kind regards,
Filip Grujcic

VCC
Posts: 463
Joined: 08 Jun 2009 18:31
Location: Romania

Re: v4.0.0 Absolute search paths made relative to other abso

#3 Post by VCC » 27 Feb 2019 12:55

Hi,
I'm glad that it's reproducible. I didn't test this on the other compilers, but it might also be the case there.

Thank you

Post Reply

Return to “mikroPascal PRO for PIC32 Beta Testing”