Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Impex modules are connected with very lazy checking #3

Open
luczsoma opened this issue Apr 11, 2017 · 2 comments
Open

Impex modules are connected with very lazy checking #3

luczsoma opened this issue Apr 11, 2017 · 2 comments
Assignees
Labels

Comments

@luczsoma
Copy link
Collaborator

luczsoma commented Apr 11, 2017

The modules in the import-export cypher queries are connected with the following condition:

exporter.parsedFilePath CONTAINS import.moduleSpecifier

If exporter.js exports export { name1 as exportedName1 } and importer.js imports import { exportedName1 as importedName1 } from "exporter", then:

  • exporter.parsedFilePath is /path/to/codemodel/rifle/resources/exporter.js
  • import.moduleSpecifier is simply exporter

This is usually enough if there are only few modules with significantly different names, but is not perfect: if there are more than one exporter.js in different paths, there will be collisions, I guess. Edge cases and solutions are to be examined.

@luczsoma luczsoma self-assigned this Apr 11, 2017
@luczsoma luczsoma changed the title Impex modules are connected with a very lazy checking Impex modules are connected with very lazy checking Apr 11, 2017
@steindani
Copy link
Collaborator

steindani commented Apr 11, 2017

A workbench path has to be set when importing the project, the path for the modules should be a relative path to this, and the import statements have to be processed to import the same. Thus relying on GraphIterator to preprocess and Cypher only to search for complete matches.

@luczsoma
Copy link
Collaborator Author

Thank you, your idea shall be implemented.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@steindani @luczsoma and others