OneIdentity / IdentityManager.Imx

HTML5 source code for Identity Manager web apps
Other
29 stars 120 forks source link

One Identity Manager for Visual Studio Code -> LF vs CRLF behavior #12

Closed zimmerlis closed 2 years ago

zimmerlis commented 2 years ago

If I get Software Downloads, to install One Identity Manager or Code updates from ZIP Files, e.g.  Hotfix_35514_OneIM821, all files do have CRLF (Windows Style) of line ending. If I download or clone this repo https://github.com/OneIdentity/IdentityManager.Imx, then I will get all files with Linux LF line endings.

If I create a new Folder or local Repo for development and get the Files trough the One Identity Manager for Visual Studio Code Extension, then I get the files out from the database, but it will generate all files with line ending CR LF (Windows).

This fact makes it very hard to keep the file in coexistence with future fixes. Ist there a configuration setting to get this files with line ending CRLF (Windows)?

hannoquest commented 2 years ago

Hi,

Please note that the VS Code extension is deprecated starting with 8.2.1, so this is a bit of an unusual scenario which will not really occur in the future.

You can enforce line endings using the .gitattributes file: https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings

To apply any changes you make to .gitattributes: https://stackoverflow.com/questions/48642692/how-to-make-change-to-gitattributes-take-effect

zimmerlis commented 2 years ago

Hi Hanno

Please note that the VS Code extension is deprecated starting with 8.2.1,

We followed the instruction referenced by the HTML Developer Guide in the Readme, and there we have seen the following: https://support.oneidentity.com/de-de/technical-documents/identity-manager/8.2.1/html5-development-guide

To do this, you have the following options:

  1. Use existing HTML applications from the One Identity GitHub repository as templates (see Developing HTML applications with the One Identity GitHub repository).
  2. Use the Visual Studio Code extension

So a mix is not supported and VS Code extension is sunset soon I guess.

Questions:

  1. This means you suggest us to not start with the VS Code extension, but what about the branches functionality of the VS Code extension, should this be done by our on Git infrastructure then?
  2. It is right, that we should configure out development Environment to have CRLF (Windows Style) on all files and also have them in this way built in the dist folder and also the Zip File to be loaded into the Database?

Regards, René

hannoquest commented 2 years ago

Hi René,

The first option is the preferred option because option 2 is deprecated as stated to the Release Notes. But it should say so in this document as well; I will get this changed.

A mix is not supported because it does not really make sense: With the new model, your source files are managed by Git and not Identity Manager.

Regarding your questions:

  1. The Identity Manager compilation branches functionality is deprecated as well, as it has no purpose in the new model. The follow best practice and use Git branches.
  2. I don't have a recommendation here. I would assume that line ending styles are irrelevant for the compilation result. You can choose the line ending format of your preference when you set up your local clone of the source files.
zimmerlis commented 2 years ago

Thank you very much for the explanations