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

CRS.OnSaveAlFileAction renames the file even with a correct name pattern #303

Open
helenapi opened this issue Jun 20, 2024 · 3 comments
Open

Comments

@helenapi
Copy link

Hi, my settings.json is like this:

    "CRS.OnSaveAlFileAction": "Rename",
    "CRS.FileNamePattern": "<ObjectNameShort>.<ObjectTypeShortPascalCase>.al",
    "CRS.FileNamePatternExtensions": "<ObjectNameShort>.<ObjectTypeShortPascalCase>.al",

When I try to save a file, named for example Actions.codeunit.al, the extension renames the file and closes and reopens it, even if the file already corresponds to the FileNamePattern setting. I also get an error:

image

And the VS code UI blinks and changes the file name in the tab to italic, which means that the tab will go away if I click on another file on the sidebar. This makes the workflow a bit troublesome

image

@helenapi
Copy link
Author

I just found out that using

    "CRS.FileNamePattern": "<ObjectNameShort>.<ObjectType>.al",
    "CRS.FileNamePatternExtensions": "<ObjectNameShort>.<ObjectType>.al",

Seems to work as intended. Do you know why the original setting was displaying that behaviour? I also tried manually naming the file Actions.Codeunit.al (pascal case on object type) but the same weird behaviour happens

@JeremyVyska
Copy link

FYI, I have seen that - it's a case sensitivity issue. Close VSC, rename the "codeunit.al" to "Codeunit.al" and it will stop trying.

Still an "issue", but that's been my workaround

@vytjak
Copy link

vytjak commented Jul 12, 2024

Oh, what was bugging us for a while now as well, that weird message about existing file.

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

No branches or pull requests

3 participants