Opened 7 years ago

Closed 7 years ago

#37 closed defect (fixed)

path problem importing queries

Reported by: Thomas Owned by: mauersberger
Priority: major Milestone: Next Release
Component: engine Version: 1.4.0.22283
Keywords: Cc:
Blocked By: Blocking:
Hours Remaining: 0

Description

Hi,

The problem discussed in topic "Pathname problem importing queries" at http://projects.ikv.de/qvt/discussion/1/126 might be a bug in mediniQVT:

When importing a qvt file using import statement a file not found exception is thrown, that shows the slash between subdirectory and imported qvt file is missing.

When locating qvt file "helper.qvt" in:

C:\Temp\workspace\project1\Qvt

An import it this way:

import helper;
 transformation (...) {
 -- ...
 }

Exception says:

Exception occured in transformation
java.io.FileNotFoundException: C:\Temp\workspace\project1\Qvthelper.qvt (Das System kann die angegebene Datei nicht finden)

QVT-Standard seems not allow to add a path in import statement (MOF QVT Version 1.1, section 7.13.5).

<topLevel> ::= ('import' <unit> ';' )* <transformation>*
<unit> ::= <identifier> ('.' <identifier>)*

I wouldn't expect an <identifier> to contain the path. So it seems to me to be a bug in mediniQVT.

Thanks,
Thomas

Change History (3)

comment:1 Changed 7 years ago by mauersberger

As mentioned in the discussion only one engine global path is used to find and load imports, so it might be good to first clarify the environment this bug occurs. In any case, the current code does not check whether the path has already any trailing separator but instead just assumes one, that can be indeed fixed.

comment:2 Changed 7 years ago by mauersberger

  • Component changed from engine to debugger
  • Milestone set to Next Release
  • Owner changed from kiegeland to mauersberger
  • Status changed from new to assigned

This is a bug in the QVT launcher/debugger and will be fixed with next release

comment:3 Changed 7 years ago by mauersberger

  • Component changed from debugger to engine
  • Resolution set to fixed
  • Status changed from assigned to closed

This is a bug in the QVT launcher/debugger [...]

Correction: fixing it in the launcher code would still have the dependency to the trailing slash in the engine thus fixing it in the engine and making code more robust is the better choice.

Fixed in r143

Note: See TracTickets for help on using tickets.