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

Improvements to .tst LSP #108

Open
2 of 14 tasks
aytey opened this issue May 9, 2024 · 1 comment
Open
2 of 14 tasks

Improvements to .tst LSP #108

aytey opened this issue May 9, 2024 · 1 comment
Assignees

Comments

@aytey
Copy link
Member

aytey commented May 9, 2024

Collection of miscellaneous areas for improvement:

  • (could be easy) We mark withinTest as true if we see TEST.NEW/TEST.REPLACE/TEST.ADD, but the diagnostic when we see TEST.END (without any of the previous three) only lists TEST.NEW and TEST.REPLACE (i.e., it should also list TEST.ADD)
  • When creating TEST.VALUE lines, after the first single colon (i.e., after TEST.VALUE:), if the item is a structural (i.e., it contains fields), then we start completing on : incorrectly (it should be completing on ., which creates "nonsense" lines (e.g., TEST.VALUE:uut_prototype_stubs.stub.return:f:f:<<MAX>>) -- for this one, we need to make sure we're at a "scalar" (or similar) before we start accepting : (Andrew thinks this might be tricky)
  • When creating TEST.VALUE lines, after the second single colon (first: after TEST.VALUE; second: after unit.sub.param), the extension keeps giving suggestions for additional colons (this allows you to create lines such as TEST.VALUE:unit.subprogram.param:<<MAX>>:<<MAX>>:<<MAX>>) -- for this one, if we see a third single colon, we need to not provide any suggestions
  • (could be easy) Auto-complete on void* should list all of the user globals + NULL
  • (could be easy) TEST.THISDOESNTEXIST before TEST.NEW gives an error diagnostic; doing it after, the LSP happily ignores totally incorrect TEST.<whatever> commands
  • (could be easy) Should we give errors on TEST.REQUIREMENT_KEY if there's no RGW configured?
  • (could be easy) For a C++ environment TEST.VALUE.unit.<<GLOBAL>>. lists the "C" instances (e.g., C_976400856_9), these shouldn't be shown
  • For pointers:
    • Auto-complete immediately lists p[0], when it should really show p
    • There should be suggestions for <pointer><colon>, which should should list NULL or a malloc size
    • Selecting a malloc size should (maybe) create all of the elements in the list
    • If you try to access a cell that isn't in the range of the malloc, we should give an error diagnostic
  • We don't give hover information for pointers (either as params or fields)
@aytey aytey changed the title LSP issues Improvements to .tst LSP Aug 29, 2024
@aytey
Copy link
Member Author

aytey commented Aug 30, 2024

This example is "abusive" but:

class Meep {
public:
  virtual void meep() = 0;
};

namespace Moo {
class Meep : public ::Meep {
public:
  virtual void meep();
};

namespace Quack {
class Meep : public ::Meep {
public:
  virtual void meep();
};
namespace Oink {
class Meep : public ::Meep {
public:
  virtual void meep();
};
namespace Honk {
class Meep : public ::Meep {
public:
  virtual void meep();
};
class Baa {
public:
  class Meep : public ::Meep {
  public:
    virtual void meep();
  };
};
} // namespace Honk
} // namespace Oink
} // namespace Quack
} // namespace Moo

void foo(Meep &m) { m.meep(); }

We should get:

image

Right now, we just get the pointer case ("Auto-complete immediately lists p[0], when it should really show p").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants