-
Notifications
You must be signed in to change notification settings - Fork 23
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
Request completionItem/resolve failed #124
Comments
I suspect this issue is fixed in v0.33.0 (currently in the master branch), but if you can give me a simple reproducible example, I can investigate further. Based on the message, it looks the error happened during autocomplete, while collecting information about an attribute (e.g., a method declared with one of the |
Seems you're right, when I start type module Web::Controllers::Exports
module InternalContracts
class Create
include Web::Action
params do
required(:internal_contract).schema do
required(:start_date).filled(:str?)
required(:end_date).filled(:str?)
required(:state).maybe(:str?)
end
end
def call(params)
authorize! :contracts, :export
if params.valid?
schedule_mail
flash[:info] = t('controllers.exports.contracts.mail_scheduled')
else
flash[:error] = params.errors
end
redirect_to routes.export_path
end
private
def schedule_mail
Mailers::Exports::Contract.schedule(
user_id: current_user.id,
export_type: :base,
**params[:internal_contract]
)
end
end
end
end |
Is that Hanami? I tried creating a Hanami project and adding that controller, just to see how Solargraph handled it. It definitely looks like the project's maps are incomplete, but I still couldn't reproduce the error. |
Yes, this is Hanami project. But it has many files. |
Gem v0.33.0 is released. It should fix the problem with resolving attribute completion items. |
Seems works fine. Thank you @castwide! |
Wait, I restarted VS code and now see this:
|
Can you go to the workspace in a terminal and run |
|
Thanks. I suspect that happened because of an
Can you confirm whether your code contains an unnamed |
Yes, I found this: # @!attribute [r]
# @return [String] the field name of the contract PDF template
attribute :field_name, Types::String |
This syntax should work: # @!attribute [r] field_name
# @return [String] the field name of the contract PDF template
attribute :field_name, Types::String Note that the I'll have the unnamed attribute bug fixed in a patch release tomorrow. |
Gem v0.33.1 fixes the unnamed attribute bug. |
It no longer crashes, thanks! |
I receiving this in output console many times when type:
VS Code: 1.35.1 (1.35.1)
Solargraph: 0.32.5
gem env
:From developer console:
The text was updated successfully, but these errors were encountered: