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

Support for .yaml file endings #6848

Closed
hanna-modica opened this issue Apr 14, 2023 · 11 comments
Closed

Support for .yaml file endings #6848

hanna-modica opened this issue Apr 14, 2023 · 11 comments
Labels
configuration About configuration topics enhancement Issues that are considered to be enhancements help wanted An issue where third-party help is wanted on

Comments

@hanna-modica
Copy link
Contributor

ORT does not detect files with .yaml as ending (e.g. .ort.yaml). According to YAML FAQs [1] it is the preferred official file ending. Supporting it would mean less chances for errors.

[1] https://yaml.org/faq.html

@sschuberth
Copy link
Member

If we did this for .ort.yml, we'd consequently need to do it for a bunch of other files like config.yml, too. It also raises the question what to do if both .ort.ymland .ort.yaml are present. Thus, personally I currently have a tendency to not support this.

@sschuberth sschuberth added enhancement Issues that are considered to be enhancements configuration About configuration topics labels Apr 14, 2023
@tsteenbe
Copy link
Member

I remember us having a discussion about this, although the spec preferred file ending is.yaml the community especially within CI/CD tools choose to standardize .yml file ending see:

Examples:

@bjoern-arnold
Copy link

As I raised the topic initially I just wanted to say that I understand your points. The issue was, that we didn't realize that the ort file we provided was not recognized by the tool at all (because of the wrong file suffix). Probably it would be sufficient to explicitly mention this in the documentation and/or log a warning if no ort file was found.

@sschuberth
Copy link
Member

Probably it would be sufficient to explicitly mention this in the documentation

Isn't https://github.com/oss-review-toolkit/ort#repository-configuration-file sufficient / explicit enough?

@tsteenbe
Copy link
Member

tsteenbe commented Apr 17, 2023

I believe it may be useful to add a check for *.ort.yaml files during a project scan which throws a technical issue with a how-to-fix explaining to the use .yml is the extension to use with a reference to https://github.com/oss-review-toolkit/ort/blob/main/docs/config-file-ort-yml.md

@hanna-modica @bjoern-arnold Would this would for you both? Let us know so we can update this issue accordingly.

@sschuberth
Copy link
Member

I believe it may be useful to add a check for *.ort.yaml files during a project scan which throws a technical issue with a how-to-fix

However, the effort to implement this would be pretty much the same as do supporting *.ort.yaml...

@hanna-modica
Copy link
Contributor Author

However, the effort to implement this would be pretty much the same as do supporting *.ort.yaml...

At least it would remove the overhead to add this file ending support to all the other files. What is you opinion @bjoern-arnold?

@bjoern-arnold
Copy link

I believe it may be useful to add a check for *.ort.yaml files during a project scan which throws a technical issue with a how-to-fix explaining to the use .yml is the extension to use with a reference to https://github.com/oss-review-toolkit/ort/blob/main/docs/config-file-ort-yml.md

Yes, that sounds good. Probably it would even be better to scan for the absence of "*.ort.yml" and report a warning if it does not exist, together with a reference to the documentation. Assuming that virtually any project requires a project specific configuration file, of course.

@tsteenbe
Copy link
Member

Discussed in the ORT community call of April 27th

  1. Agreed to add a warning
  2. Would like to have warning for parsing issues with .ort.yml file

@sschuberth sschuberth added the help wanted An issue where third-party help is wanted on label Apr 27, 2023
@sschuberth
Copy link
Member

Closed as part of backlog grooming. Feel free to comment if you would like to contribute to this.

@sschuberth sschuberth closed this as not planned Won't fix, can't repro, duplicate, stale Oct 8, 2024
@sschuberth
Copy link
Member

Note that

/**
* Specifies the [YAML](http://yaml.org/) format.
*/
YAML(yamlMapper, "yml", "yaml");

already knows how to treat .yaml file extensions. So if you really want to use them, you could use the varous CLI options for specifying files, like --config, to point to a .yaml file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration About configuration topics enhancement Issues that are considered to be enhancements help wanted An issue where third-party help is wanted on
Projects
None yet
Development

No branches or pull requests

4 participants