dartdoc icon indicating copy to clipboard operation
dartdoc copied to clipboard

[Feature Request] Add some distinguishable info to the file name

Open literalEval opened this issue 2 years ago • 3 comments
trafficstars

General Info

We are an Open Source organization, using Dart Doc to document our codebase :) The overall org's documentation is built using Docusaurus and is hosted on GitHub Pages.

The Problem

Dart Doc seems to generate files with the same name. So say there is a class named Message, which has an attribute named message, then their respective HTML files will be Message.html and message.html. This is causing issues with the deployment, as it says that Files with same name but different case can't be used. Refer this deploy action fail to see the exact issue.

Possible Solution

If there already exists any way to generate files with distinguishable names, please let me know. Otherwise, it would be good to configure Dart Doc to produce files with different names. This can be achieved by adding files hash to their name itself. Or a numbering before their name?

literalEval avatar Apr 14 '23 05:04 literalEval

Dartdoc already has some filename collision management logic for edge cases but I don't think it is case-insensitive. Adding to that or having a collision-proof naming scheme both could work. A collision proof naming scheme will break package cross-linking during rollout if not controlled by a dartdoc option so perhaps an implementation could use a dartdoc_options.yaml option.

jcollins-g avatar Apr 14 '23 20:04 jcollins-g

@jcollins-g glad you considered this an enhancement. I will be more than happy if I could help in it's development :)

literalEval avatar Apr 15 '23 05:04 literalEval

The important message in the error we see with the Docusaurus deployment is:

  • This will lead to a race-condition and corrupted files on case-insensitive file systems

This means that in our situation, Docusaurus is trying to protect itself from files with the same name but different capitalizations being overwritten on Windows filesystems, thereby breaking the markdown to HTML conversion process.

palisadoes avatar Apr 15 '23 06:04 palisadoes