gammasoft71 / xtd

Free open-source modern C++17 / C++20 framework to create console, GUI (forms like WinForms) and unit test applications and libraries on Microsoft Windows, Apple macOS and Linux.
https://gammasoft71.github.io/xtd
MIT License
779 stars 59 forks source link

[BUG] xtd.tunit - Invalid links in xtd/examples/xtd.tunit.examples/README.md #183

Closed jimorc closed 2 years ago

jimorc commented 2 years ago

Describe the bug

All links in xtd/examples/txd.tunit.examples/README.md to header files produce 404 error

To Reproduce

  1. On Github, open gamasoft71/xtd/examples.xtd.tunit.examples//README.md
  2. Click on any of the links that begin with xtd::unit::
  3. Web page showing Github 404 error page is displayed.

Expected behaviour

Display appropriate header file

Screenshots

None

Desktop (please complete the following information)

N/A

I will generate a pull request to fix this if this issue is accepted.

gammasoft71 commented 2 years ago

Thank you for your feedback.

Your pull request is welcome ;-)

jimorc commented 2 years ago

This is turning into a much larger change than I envisioned when I created the issue:

  1. There are references to line_info and lineinfo functions or methods which do not exist. Instead, in line_info.cpp, there is a function called trace_message which the test uses. This results in a fairly simple rewording.
  2. Each of the headers in the README.md file links to another README.md file that contains a duplication of the contents under the header in the original README file. These README files must be updated as well.
  3. In addition to the links to the header or cpp file containing the declaration or definition of the test method being tested, there is a link to the README.md file for the program that shows how to use that method. The link to the declaration or definition of the test method also needs updating in almost every README file.
gammasoft71 commented 2 years ago

Indeed, there are many markdown files with many links.

The xtd::tunit::line_info class and the line_info_ keyword have been replaced by the xtd::diagnostics::stack_frame class and the csf_ (or current_stack_frame_) keyword.

If you think it's too ambitious for you, I can take care of it.

Or if you can't figure out how to correct or fix the links you can ask me.

You can also do it in small pieces to make it easier.

Don't hesitate to come back to me ;-)

gammasoft71 commented 2 years ago

It seems to me that for most of the links, it is enough to replace the path https://github.com/gammasoft71/xtd/blob/master/src/xtd.tunit/include/xtd/xxx.h by https://github.com/gammasoft71/xtd/blob/master/src/xtd.tunit/include/xtd/tunit/xxx.h

xxx being the class name of the link.

And then see after the particular cases like line_info_ and others...

jimorc commented 2 years ago

Adding tunit/ to the path is what I have been doing.

I only mentioned the necessary changes to document what is needed. Otherwise, this issue would imply that changes to a single markdown file would be sufficient to complete this issue. This would be a mismatch to the many files changed in the pull request. I am working on it.

gammasoft71 commented 2 years ago

The markdown file hierarchy is important. I use this hierarchy to document the examples in xtdc-gui (not finished yet). But my goal is to generate html pages to document the examples through control xtd::forms::web_browser (not yet written). The goal is to present the examples a bit like in Qt Creator.

Therefore the classification into subgroups with redundant information on the brief information is necessary. The files of the subfolders give only a brief description of the different examples that compose it. While each example contains (will contain) a detailed description of the example.

This may seem very redundant at the moment, as the detailed description of an example is not yet written. But this will come with time.

Moreover the advantage is to have a README.md in each directory to describe the content of the directory when you browse it via github. Most of the directories in xtd have a README.md.

Summary

xtd/examples/README.md

Exemple

xtd/examples/xtd.core.examples/README.md

xtd.core

xtd/examples/xtd.core.examples/hello_wolrds/README.md

xtd/examples/xtd.core.examples/hello_wolrds/hello_worlds/hello_world_console/README.md

Provides a brief and detailed description for hello Wordl console

Remarks

Do not modify the hierarchy of markdown files.

jimorc commented 2 years ago

I was not questioning why you set up the document structure you did, just documenting all of the changes that are required.

gammasoft71 commented 2 years ago

Yes but the purpose of my remark is precisely so that you understand why some pages could seem redundant ;-)

jimorc commented 2 years ago

I have done a pull request. It seems to have created issue 184.

gammasoft71 commented 2 years ago

The number #184 is the number of the pull request ;-) I will set fixed attribute and close the issue #183.

gammasoft71 commented 2 years ago

I have reviewed your contribution and everything seems correct. Thank you