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

Added functionality for isPath #457

Closed

Conversation

Kishore-abhimanyu
Copy link

@Kishore-abhimanyu Kishore-abhimanyu commented Oct 4, 2021

 I worked on the ispath to check whether the given string is symbolic link or not. Added docs and test file

Context of the change :

#450 (comment)

  • Bug fix

  • New feature

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@WillDaSilva
Copy link
Contributor

Why is the function called isPath if it's checking whether something is a symbolic link or not? Not all paths are symbolic links.

@Kishore-abhimanyu
Copy link
Author

Why is the function called isPath if it's checking whether something is a symbolic link or not? Not all paths are symbolic links.

File name has been changed. Could you check now?

@Jason2605
Copy link
Member

The name the issue stated is fine, isLink.

Few things as well, you will need to add the test file to here.

The code seems to be slightly mis-indented unfortunately.

And finally, this will break windows builds. If we intend this to not work on windows (which may be a viable option to begin with) we either need to 1) remove this and make sure it doesn't get compiled on windows systems entirely. 2) Do something similar to Python where it just returns False on runtimes that don't support it (less hot on this as to me it feel like a silent fail).

@Jason2605 Jason2605 added the enhancement Implementation of a new feature label Oct 4, 2021
@Jason2605
Copy link
Member

Hi @Kishore-abhimanyu, it seems the tests are failing on this pull request. Are you still interested in getting this feature in?

@Kishore-abhimanyu
Copy link
Author

Could you review now?

@Jason2605
Copy link
Member

These tests will still end up failing unfortunately - you're asserting that "linktofile" is a symlink, however, it doesn't exist.

This will still also fail to compile on windows systems:

dictu_api_static.lib(path.obj) : error LNK2019: unresolved external symbol lstat referenced in function isLinkNative [D:\a\Dictu\Dictu\build\src\cli\dictu.vcxproj]
dictu_api_static.lib(path.obj) : error LNK2019: unresolved external symbol S_ISLNK referenced in function isLinkNative [D:\a\Dictu\Dictu\build\src\cli\dictu.vcxproj]

@Jason2605
Copy link
Member

Closing due to inactivity

@Jason2605 Jason2605 closed this Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Implementation of a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants