Project

General

Profile

Bug #923

Linux : home tree

Added by Baptiste Pillot over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
10/19/2022
Due date:
% Done:

0%

Estimated time:
Affected version:

Description

When I try to run a program with an error, eg here if I type Degreee instead of Degree*, the transpilers stops with an error "syntax error at line 2, column 8, in file GameJam37.aoz", but it generates some side-effects :

Folders and an empty copy of my .aoz program is created into my projet folder. It is a copy of the absolute path of my project :

The created .aoz file is empty.

Sometimes the error focus goes to my original GameJam37.aoz file. But sometimes it goeds into the new empty file, which opens into a new tab.

What it does and should not :

  • creates an empty home/baptiste/AOZ_Studio/my_aoz_applications/GameJam37.aoz file into my project folder
  • opens the new GameJam37.aoz file into a new tab (so I finish with 2 tabs of the "almost-same" file)
  • when I transpile it again, with the bad file existing before the transpilation : focuses the new empty GameJam37.aoz file instead of the right one

What it should do :

  • only focus the original GameJam37.aoz file, without creating and opening new things.

I guess there is some king of missing a slash (/) at the beginning of a file path, somewhere, so the path and file re-creates itself on a relative way instead of being read on an absolute way.


Files

home-tree.png (76.2 KB) home-tree.png Baptiste Pillot, 10/19/2022 09:29 AM
#1

Updated by Baptiste Pillot over 1 year ago

  • Description updated (diff)
#2

Updated by Baptiste Pillot over 1 year ago

  • Target version deleted (none)
#3

Updated by Baptiste Pillot over 1 year ago

  • Status changed from New to In Progress
  • Assignee set to Baptiste Pillot
  • Target version set to 1.0.0 (B17)

Je travaille dessus.

  • étape 1 : mettre des traces (console.log sur FS.existsSync) autour du transpileur pour voir si ce dossier home est créé avant, pendant ou après que le transpileur tourne. Ça se passe après, bien après.
  • étape 2 : chercher ce qui crée ce dossier plus tard dans le process (après l'échec du transpileur). Reste à faire.

Notes : ~/aoz/editor2prod me permet de copier les scripts sur lesquels je travaille vers la prod. J'ai notamment pris un aoz-studio-view.js issu de la prod, sur lequel je n'ai appliqué que ma modif pour cert, car ce script dans sa version actuelle a subi beaucoup d'évolutions plante sur la version beta 16 u25.

#4

Updated by Baptiste Pillot over 1 year ago

Recherches :

Dans aoz-studio-view.js : gotoNextError(), on appelle atom.workspace.open( atomSourcePath + PATH.sep + message.path );. Or si j'affiche la chaîne en question ça donne :

  • Sous Windows : C:/AOZ_Studio/my_aoz_applications/Mon Application\C:/AOZ_Studio/my_aoz_applications/Mon Application/Mon Application.aoz : le path est en double, mais je suppose qu'il arrive à s'en débrouiller, par un quelconque coup de Trafalgar.
  • Sous Linux, même souci : /home/baptiste/AOZ_Studio/my_aoz_applications/MonApplication//home/baptiste/AOZ_Studio/my_aoz_applications/MonApplication/MonApplication.aoz : ici ça ne pardonne pas, et le fichier est recréé à blanc (la première fois), ou ça pointe sur ce fichier s'il existe déjà (la deuxième fois), quitte à l'ouvrir dans un nouvel onglet.

La solution : et bien il ne faut pas doubler le chemin d'accès au fichier, et ça devrait aller tout bien.
Par sécurité, je peux tester le chemin, voir s'il est complet (débute par X: ou /). S'il ne l'est pas, je peux continuer à faire la concaténation. Car je ne sais pas : le déboguage peut peut-être être demandé depuis d'autres endroits que mon cas ici.

Path appliqué pour la prochaine release, si ce que je propose convient.

#5

Updated by Baptiste Pillot over 1 year ago

  • Status changed from In Progress to Resolved
#6

Updated by Baptiste Pillot over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF