Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cross-platform import/exports of Dbux log files in importExport.js #642

Open
3 tasks done
Domiii opened this issue Jan 9, 2022 · 0 comments
Open
3 tasks done
Assignees
Labels
bug Something isn't working priority

Comments

@Domiii
Copy link
Owner

Domiii commented Jan 9, 2022

Currently, exporting on one machine and importing from another is not going to work when outside dbux-projects.

  • Fix file paths
    • Currently, all file paths in app are resolved via allApplications.appRoot.
      • That is resolved as allApplications.appRoot = getProjectManager().config.projectsRoot || getCodeDirectory().
      • This option seems to ignore the latter, because projectsRoot is always set (for now).
    • When exporting: first determine if its a built-in project
      • → maybe similar to how _handleNewApplication does it, which sets the projectName, but maybe change to builtInProjectName
      • If projectsRoot is present:
        • resolve file paths relative to projectsRoot
      • If builtInProjectName is not present:
        • resolve file paths relative to getAppCommonAncestorPath instead (e.g. getAllProgramsByPackage shows how to use it)
        • encode getAppCommonAncestorPath to generate a appPathId (to identify whether multiple apps are actually all in the same folder)
    • When importing:
      • if builtInProjectName is present, resolve it as usual (projectsRoot)
      • if not, ask user to input project path (since we cannot guess where a user might store arbitrary code on their machine), and resolve relative to that.
        • When importing multiple apps (see Pathways part below), first, iterate all different appPathIds and ask user up front
    • fix docs: https://domiii.github.io/dbux/advanced/data-analysis#art-vandelay
  • Test it with different workspaces loaded.
    • Test w/ applications recorded from dbux-projects and also w/ applications NOT from dbux-projects
  • Also fix Pathways import/export to also use above method
@Domiii Domiii added bug Something isn't working priority labels Jan 9, 2022
@Domiii Domiii changed the title Fix cross-platform import/exports in importExport.js Fix cross-platform import/exports of Dbux log files in importExport.js Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority
Projects
None yet
Development

No branches or pull requests

2 participants