vjekob / al-objid

Manage object IDs in multi-user environments with mind-boggling simplicity.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ninja in multiroot workspace

MaxFalcone opened this issue · comments

Hi, app authorization doesn't work in multiroot workspace.
Steps are:

  1. Create workspace with two apps (App and Test)
  2. Click unauthorized
    image
  3. Click Yes
    image
  4. Click Yes
    image
  5. Nothing happens, no error, no message, nothing in the log, app still unauthorized.

Additionally id sync throws error

  1. In range explorer click Automatically synchronize entire workspace
  2. Select Fully Automated
    image
  3. See error (message about dirty git tree is from the first try)
    image

This all works with single app opened as folder (not as workspace).
In this example I actually have only one al app in App folder. Test and CICD folders are empty, but error is the same when test app exists. CICD folder never contains app, it is for yamls only.

These seem to be bugs (and I'll treat them as such for now) and I'll try to reproduce them.

What seems to be the problem in the authorization case is that your repo is dirty, and authorization can only work on a clean repo. What's strange is that you don't get an error message.

Regarding the other one, I'm really not sure what exactly is this about. Can you tell me more about how this multi-root workspace was created?

Yep, repo was dirty, but when I noticed it I commited all changes and tried again. Same result. Ninja does show message about dirty repo.

Maybe it has something to do with VS Code version or other extensions, because I noticed that another extension git-lens doesn't work for me when using multi-root workspace.

The worksspace is nothing special. Here is the definition.

{
	"folders": [
		{
			"path": "App",
		},
		{
			"path": "Test"
		},
		{
			"path": "CICD"
		}
	],
	"settings": {
		"files.exclude": {
			"*.app": true,
			"**/.alpackages": true,
			"**/.snapshots": true,
			"**/.vscode": true
		},
		"search.exclude": {
			"*.app": true,
			"**/.alpackages": true,
			"**/.snapshots": true,
			"**/.vscode": true
		},

		"CRS.ObjectNameSuffix": " XXX",
		"CRS.AlSubFolderName": "src",
		"CRS.FileNamePattern": "<ObjectNameShort>.<ObjectTypeShortPascalCase>.al",
		"CRS.FileNamePatternExtensions": "<ObjectNameShort>.<ObjectTypeShortPascalCase>.al",
		"CRS.FileNamePatternPageCustomizations": "<ObjectNameShort>.<ObjectTypeShortPascalCase>.al",
		"CRS.RemovePrefixFromFilename": true,
		"CRS.RemoveSuffixFromFilename": true
	},
	"extensions": {
		"recommendations": ["davidfeldhoff.al-codeactions", "wbrakowski.al-navigator", "martonsagi.al-object-designer",
		"rasmus.al-var-helper", "andrzejzwierzchowski.al-code-outline", "usernamehw.errorlens", "nabsolutions.nab-al-tools",
		"waldo.crs-al-language-extension", "rvanbekkum.xliff-sync"]
	}
}

Tried to disable all other extensions. No luck.

We are experiencing the same problem. When opened as multiroot, it fails and will not get the dialog about commiting to the branch etc. No output in the output window. When we opened the App folder directly without using multiroot workspace, all worked (this is workaround).

Console of developer tool of VSCode shows this>
image

This actually seems to be caused by the same bug as reported in #39

This is fixed in 2.9.2 that has just been released.