wenchun / jsdoc-toolkit

Automatically exported from code.google.com/p/jsdoc-toolkit
0 stars 0 forks source link

jsdoc template issue with case insensitive filesystems #162

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create two classes, one called "example" and one called "Example".
2. Document both symbols.
3. Use the jsdoc template to generate the documentation on a
case-insensitive filesystem (on Windows or on a vfat partition under linux)

What is the expected output?
Both symbols are documented into separate files.

What do you see instead?
The file for the second symbol has overwritten the first one. So the
documentation index contains both "example" and "Example", but both only
have the contents of "Example".

What version of the product are you using?
2.0.1

On what operating system?
I used it on Linux but outputting on a vfat partition. So the problem might
as well happen when using jsdoc under Windows.

Original issue reported on code.google.com by PVinc...@googlemail.com on 7 Jul 2008 at 1:43

GoogleCodeExporter commented 8 years ago
Here is a patch that solves this problem.

When running the template, it will first create a mapping from symbols to 
symbol file
names and ensure that there are no duplicates, in a case insensitive way. All 
further
duplicates of a given symbol name will have a number appended to their 
filenames.

The Link class has been modified to make use of the files mapping when creating 
links
between files.

Original comment by PVinc...@googlemail.com on 8 Jul 2008 at 3:56

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by micmath on 21 Jun 2009 at 4:37

GoogleCodeExporter commented 8 years ago
It may be rare that people name their symbols identically except for case but 
for those who do and who also 
work on case-insensitive file systems (as I do, using Apple's HFS+) the 
consequence is very bad: missing 
documentation. So I think this warrants a usable solution.

This probably could have been dealt with via a plugin running an onSymbolLink 
handler, but I chose to add it 
to the template. I assume people will want to control whatever system is used 
to generate the unique output 
names. The new commandline option -u or --unique will switch this on, and is 
recommended for anyone 
using a case-insensitive fs to generate their output files.

This was committed in revision 801 and will be in release version 2.3.0.

Original comment by micmath on 21 Jun 2009 at 10:38