Skip to content

Commit

Permalink
WIP: Fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
varungandhi-src committed Jul 2, 2024
1 parent f771346 commit a1622a8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cfg/builder/builder_walk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ BasicBlock *CFGBuilder::walk(CFGContext cctx, ast::ExpressionPtr &what, BasicBlo
auto zloc = rescueCase->var.loc().copyWithZeroLength();
auto unsafe = ast::MK::Unsafe(
zloc, ast::make_expression<ast::Local>(zloc, exceptionValue.data(cctx.inWhat)));
ensureBody = walk(cctx.withTarget(localVar), unsafe, ensureBody);
ensureBody = walk(cctx.withTarget(LocalOccurrence{localVar, local->loc}), unsafe, ensureBody);
//CHECK:VARUN - ^Need LocalOccurrence above?
}

Expand Down
5 changes: 3 additions & 2 deletions rewriter/Command.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ void Command::run(core::MutableContext ctx, ast::ClassDef *klass) {
// method, there are no calls to it, which will frustrate the user. Erase
// the location(s) on the non-synthetic method so that LSP only sees the
// synthetic method.
auto hiddenCall = ast::MK::Method(call->loc.copyWithZeroLength(), call->declLoc.copyWithZeroLength(), call->name,
std::move(call->args), std::move(call->rhs), call->flags);
auto hiddenCall = ast::MK::Method(call->loc.copyWithZeroLength(), call->declLoc.copyWithZeroLength(),
call->nameLoc.copyWithZeroLength(), call->name, std::move(call->args),
std::move(call->rhs), call->flags);

// We need to make sure we assign into `callptr` prior to inserting into
// `klass->rhs`, otherwise our pointer might not be live anymore.
Expand Down
1 change: 1 addition & 0 deletions scip_indexer/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ cc_library(
"//cfg",
"//common",
"//core",
"//core/source_generator",
"//main/lsp",
"//proto",
"//sorbet_version",
Expand Down
7 changes: 4 additions & 3 deletions scip_indexer/SCIPSymbolRef.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include "common/FileSystem.h"
#include "common/sort/sort.h"
#include "core/source_generator/source_generator.h"
#include "core/Loc.h"
#include "main/lsp/LSPLoop.h"

Expand Down Expand Up @@ -225,9 +226,9 @@ void GenericSymbolRef::saveDocStrings(const core::GlobalState &gs, core::TypePtr
}
case Kind::Method: {
auto ref = this->selfOrOwner.asMethodRef();
auto resultType = ref.data(gs)->owner.data(gs)->resultType;
checkType(resultType, fmt::format("result type for {}", ref.showFullName(gs)));
markdown = realmain::lsp::prettyTypeForMethod(gs, ref, resultType, nullptr, nullptr);
auto recvType = ref.data(gs)->owner.data(gs)->resultType;
checkType(recvType, fmt::format("receiver type for {}", ref.showFullName(gs)));
markdown = core::source_generator::prettyTypeForMethod(gs, ref, recvType, nullptr, nullptr, core::ShowOptions());
// FIXME(varun): For some reason, it looks like a bunch of public methods
// get marked as private here. Avoid printing misleading info until we fix that.
// https://github.com/sourcegraph/scip-ruby/issues/33
Expand Down

0 comments on commit a1622a8

Please sign in to comment.