Skip to content

Conversation

@jpogran
Copy link
Contributor

@jpogran jpogran commented Oct 24, 2018

Fixes #66, reported in puppetlabs/puppet-vscode#331

@jpogran jpogran self-assigned this Oct 24, 2018
@jpogran jpogran added the bug Something isn't working label Oct 24, 2018
@jpogran jpogran added this to the 0.16.0 milestone Oct 24, 2018
@jpogran jpogran force-pushed the GH-331-fix-go-to-definition branch 2 times, most recently from 496ff48 to a77cc1b Compare October 24, 2018 22:33
@jpogran jpogran changed the title (WIP)(GH-331) Fix go to definition (WIP)(GH-66) Fix go to definition Oct 24, 2018
@jpogran jpogran force-pushed the GH-331-fix-go-to-definition branch from a77cc1b to fe567bf Compare October 24, 2018 23:03
end
private_class_method :function_name

def self.build_uri(path)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this should be a generic helper. Although, nothing else is broken yet...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this being useful in other providers that handle opening or doing things to files

end
private_class_method :function_name

def self.build_uri(path)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need unit tests on this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@glennsarti glennsarti modified the milestones: 0.16.0, 0.15.1 Oct 25, 2018
@jpogran
Copy link
Contributor Author

jpogran commented Oct 25, 2018

tested working on ubuntu 18.04

go_to_defintion

@jpogran jpogran force-pushed the GH-331-fix-go-to-definition branch 2 times, most recently from c7b8676 to ef8286f Compare October 27, 2018 02:23
@jpogran
Copy link
Contributor Author

jpogran commented Oct 27, 2018

@glennsarti did rubocop rules change recently? Tests work, but rubocop is now complaining about hash alignment in files i didn't touch

@glennsarti
Copy link
Contributor

glennsarti commented Oct 29, 2018

@jpogran #70 will pin rubocop. Once that's merged you can rebase.

@glennsarti
Copy link
Contributor

I'm happy to merge this without red CI. Rubocop is tested last for a reason :-)

This commit fixes building file paths on platforms that use leading
slashes. Before the `file://` uri had too many slashes with a path that
starts with a backslash. This fix checks the string to see if it starts
with a slash and adds the appropriate amount of slashes.
@jpogran jpogran force-pushed the GH-331-fix-go-to-definition branch from ef8286f to 61fcfbb Compare October 29, 2018 13:54
@jpogran jpogran changed the title (WIP)(GH-66) Fix go to definition (GH-66) Fix go to definition Oct 29, 2018
Copy link
Contributor

@glennsarti glennsarti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it

Mandy

@michaeltlombardi michaeltlombardi merged commit 13bd6c1 into puppetlabs:master Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants