Skip to content

Incorrect "docs" generated from the Doxygen in the hover #10461

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

Closed
H-G-Hristov opened this issue Feb 3, 2023 · 10 comments
Closed

Incorrect "docs" generated from the Doxygen in the hover #10461

H-G-Hristov opened this issue Feb 3, 2023 · 10 comments
Labels
bug Feature: Doc comments An issue related to code comments shown in hover, completion, and signature help. fixed Check the Milestone for the release in which the fix is or will be available. Language Service Works in VS So we'd need to fix it for VS Code to reach parity.
Milestone

Comments

@H-G-Hristov
Copy link

H-G-Hristov commented Feb 3, 2023

Type: Bug

The docs are rendered incorretly for the following header file:

#pragma once

#include <string>
#include <string_view>

#include <tl/expected.h>

namespace nbnc::register_with_server {

/**
 * @brief A simple a ADM user data property list configuration parser.
 *
 */
class IAdmInstallUserDataPlist
{
public:
    virtual ~IAdmInstallUserDataPlist() = default;

public:
    /**
     * @brief Checks if there is a plist content loaded.
     * @details The function doesn't guarantee that the loaded plist is a valid `launchd` plist.
     *
     * @return true - if there is a plist
     * @return false - if there is none.
     */
    [[nodiscard]] virtual bool IsValid() const noexcept = 0;

    /**
     * @brief Loads a `launchd` plist from file.
     * @details Use this method to read binary and text plists.
     *
     * @param filepath A full path to a plist file.
     */
    virtual tl::expected<void, std::string> LoadFromFile(std::string_view filepath) noexcept = 0;

public:
    /**
     * @brief Gets the value for `ActivationKey` key.
     * @details This optional key is used to control whether your job is to be kept continuously running or to let
     * demand and conditions control the invocation.
     *
     * @return tl::optional<std::string>
     */
    [[nodiscard]] virtual tl::optional<std::string> GetActivationKey() const noexcept = 0;

    /**
     * @brief Gets the value for `ADID` key.
     * @details  This optional key is used to control whether your job is to be kept continuously running or to let
     * demand and conditions control the invocation.
     *
     * @return tl::optional<std::string>
     */
    [[nodiscard]] virtual tl::optional<std::string> GetAdidKey() const noexcept = 0;
};

}  // namespace nbnc::register_with_server

Screenshot 2023-02-03 at 16 21 47

Screenshot 2023-02-03 at 16 21 37

Extension version: 1.14.1
VS Code version: Code 1.75.0 (Universal) (e2816fe719a4026ffa1ee0189dc89bdfdbafb164, 2023-02-01T15:24:42.903Z)
OS version: Darwin arm64 22.2.0
Modes:
Sandboxed: No

System Info
Item Value
CPUs Apple M1 Pro (8 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 2, 1, 1
Memory (System) 16.00GB (0.78GB free)
Process Argv --crash-reporter-id a7eaff19-94ae-4653-b917-d9aaab19da5d
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
vsccc:30610678
pyindex848:30577860
nodejswelcome1cf:30587006
3biah626:30602489
pyind779cf:30657577
89544117:30613380
pythonsymbol12cf:30657549
a9j8j154:30646983

@Colengms
Copy link
Contributor

Colengms commented Feb 3, 2023

Hi @H-G-Hristov . Would it be possible to provide an isolate repro? Using just the code you provided, I was unable to reproduce an issue.

@Colengms Colengms self-assigned this Feb 3, 2023
@Colengms Colengms added Language Service more info needed The issue report is not actionable in its current state labels Feb 3, 2023
@H-G-Hristov
Copy link
Author

@Colengms I am getting another strange issue in the same project:

Screenshot 2023-02-10 at 14 22 54

It looks like a different extension is trying to render the documentation comments. This is my status bar in the same project as above:
Screenshot 2023-02-10 at 14 26 27

In this project I have CMake, Python, Shellscript, Swift (Xcode) code and Objective-C.

Please note the anomaly between these two screenshots:
Screenshot 2023-02-10 at 14 28 12
Screenshot 2023-02-10 at 14 29 37

@H-G-Hristov
Copy link
Author

@Colengms Please note how "Swift" appears in the namespace:

Screenshot 2023-02-10 at 14 46 44

This could be related also to the following issue I am complaining about: #10413 (comment)

Hovering over the "Editor Language Status" displays:

"No Package.swift"
Apple Swift version 5.7.2....

Screenshot 2023-02-10 at 14 54 38

@Colengms
Copy link
Contributor

Hi @H-G-Hristov . I think you're correct that you are seeing results from another extension. I'd guess that it's the Objective-C extension, but I'm not particularly knowledgeable about extensions other than the C/C++ Extension. You could try disabling one extension at a time, to identify which is generating those results.

@H-G-Hristov
Copy link
Author

I set "C_Cpp.experimentalFeatures": "enabled", then I disabled the Swift extension https://marketplace.visualstudio.com/items?itemName=sswg.swift-lang
And the latter issue disappeared, which is a different the the former (original issue at the top). BTW even in Swift extension rendering the <std::string> string appears broken so maybe it is a string processing issue:

Screenshot 2023-02-11 at 15 50 48

So basically I have two separate issues:

  1. Doxygen strings are improperly rendered
  2. The Swift extension takes over the C++ files resulting in various issues

Do I need to report additional issue? What would be the way forward? In my project I have C++ and Swift code I'd like to have both extensions enabled.

@sean-mcmanus sean-mcmanus added bug Feature: Doc comments An issue related to code comments shown in hover, completion, and signature help. and removed more info needed The issue report is not actionable in its current state labels Feb 13, 2023
@sean-mcmanus sean-mcmanus added this to the On Deck milestone Feb 13, 2023
@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Feb 13, 2023

I believe the root cause of the doxygen hover bug with is due to #6020 , although it seems strange that it doesn't repro with std::vector<int>.

Repro code is like:

#include <vector>
#include <string>
/**
 * @return std::vector<std::string>
*/
std::vector<std::string> func()
{
    return std::vector<std::string>{};
}

@sean-mcmanus sean-mcmanus added the Works in VS So we'd need to fix it for VS Code to reach parity. label Feb 13, 2023
@H-G-Hristov
Copy link
Author

H-G-Hristov commented Feb 14, 2023

@sean-mcmanus Please also note on that screenshot how "Swift" appears between the filename "RegisterWithServer.hpp" and the namespace "nbnc" and if I click on it I see selectable items "Swift" and "C++" but if I select "C++" nothing changes really.
The status bar itself displays the file as C++. I guess this is an entirely different issue but it may be related.

@Colengms Please note how "Swift" appears in the namespace:

Screenshot 2023-02-10 at 14 46 44

This could be related also to the following issue I am complaining about: #10413 (comment)

Hovering over the "Editor Language Status" displays:

"No Package.swift"
Apple Swift version 5.7.2....

Screenshot 2023-02-10 at 14 54 38

@sean-mcmanus
Copy link
Contributor

I'm able to repro the bug I mentioned at #10461 (comment) without the Swift extension.

@Colengms Colengms removed their assignment Feb 22, 2023
@sean-mcmanus sean-mcmanus modified the milestones: On Deck, 1.17.0 Jul 18, 2023
@browntarik browntarik added the fixed Check the Milestone for the release in which the fix is or will be available. label Jul 18, 2023
@michelleangela
Copy link
Contributor

@michelleangela
Copy link
Contributor

@github-actions github-actions bot locked and limited conversation to collaborators Sep 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Feature: Doc comments An issue related to code comments shown in hover, completion, and signature help. fixed Check the Milestone for the release in which the fix is or will be available. Language Service Works in VS So we'd need to fix it for VS Code to reach parity.
Projects
None yet
Development

No branches or pull requests

5 participants