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

Workspace issues #36

Closed
pzentner opened this issue May 24, 2022 · 8 comments
Closed

Workspace issues #36

pzentner opened this issue May 24, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@pzentner
Copy link

I have been looking into using the AL-Go workspace configuration. When you have this type of workspace, it seems that Object Ninja doesn't understand that this is an AL workspace. The app doesn't activate and when I try to run any of the commands, I am getting errors that either no AL folders open (when trying to create an app pool) or no error, but nothing is happening, when trying to synchronize the object ids and select replace.

The folder structure in that example is:

root (workspace folder)

.AL-Go
App
App.Test

within the first folder, you have some Github specific stuff, in the second folder the app, and in the third folder the test app.

Let me know what you need and I can try to provide you any additional info. If it's just me having some setups not right, please let me know as well.

Thanks for all you do with this "must have" extension!

@vjekob
Copy link
Owner

vjekob commented May 25, 2022

If I understand you correctly, you have one workspace folder that contains three subfolders. So, it's just a normal folder structure, not a multi-root workspace? If this is what you have, then no, sorry, Ninja cannot support this, as this is an incorrect setup.

The only correct way to use multi-root workspace is by creating a VS Code workspace file (*.code-workspace) and open that file, rather than the folder containing that file.

Are you by any chance referring to AL-Go for GitHub templates (explained here: https://github.com/microsoft/AL-Go/#readme)

If so, then you'll notice that both of the templates contain the al.code-workspace file. You need to open that file.

If you think I have misunderstood anything, then please let me know and I'll reopen this issue.

@vjekob vjekob closed this as completed May 25, 2022
@pzentner
Copy link
Author

It is actually a workspace, but I was trying to show you the structure that is in the actual folder. I do have a workspace file in there and that file is opened (it shows also "AL (Workspace)" on the root in VS Code. I have tried it with having the .AL-Go folder and without having it as part of the workspace.

The issue might be that it was an existing app that I converted into that new structure and I have an .objidconfig file for the app, but not the test app. I have tried moving the file into the same folder as the workspace file and back into the folder where it was.

If it's moved into the "root folder" (where the workspace file is), the error I am getting is that the commands are not found (probably, because it's not activating the extension). If I have the config file where it was, I am getting the error that no AL folders are open.

If you want, I can send you the app, but I don't want to post it here.

@vjekob
Copy link
Owner

vjekob commented May 27, 2022

I'd prefer if you posted your app here. Can you do this:

  • Create a copy of your entire root directory
  • Remove all AL files, they aren't needed for anything
  • In app.json change ID, description or any properties that could be used to identify you or your company

However, before you do that - are you sure that your workspace is a multi-root workspace, rather than a single-root workspace with three subfolders?

@pzentner
Copy link
Author

Here is the zipped file:

zipped file

It is a multi-root workspace, based on the definition of it, I would think. It has the same root folder all of the projects are in there, but they are all referenced in the workspace file.

@vjekob vjekob reopened this May 27, 2022
@vjekob
Copy link
Owner

vjekob commented May 27, 2022

Thanks for this file. At first sight, I can see that this configuration really shows the behavior you explain, while all seems to be configured correctly.

I'm reopening this issue, and I'll investigate.

@vjekob vjekob added the bug Something isn't working label May 27, 2022
@vjekob
Copy link
Owner

vjekob commented May 27, 2022

Here's the deal. The app.json files in that workspace are not in UTF-8 format, but in UTF-8 with BOM format. Apparently, Node.js runtime fails to JSON.parse() UTF-8 with BOM correctly.

More about UTF-8 with BOM:
https://stackoverflow.com/questions/2223882/whats-the-difference-between-utf-8-and-utf-8-without-bom

I've found a workaround here:
nodejs/node-v0.x-archive#1918

I'll now try to see if it helps.

@vjekob
Copy link
Owner

vjekob commented May 27, 2022

Apparently, the workaround I linked above works fine, so I'll include the fix for this ASAP.

Thanks for finding this bug!

@vjekob
Copy link
Owner

vjekob commented May 27, 2022

Fixed in 2.7.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants