Skip to content

Custom names_repair_arg #692

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

Closed
hadley opened this issue Nov 28, 2019 · 4 comments · Fixed by #1038
Closed

Custom names_repair_arg #692

hadley opened this issue Nov 28, 2019 · 4 comments · Fixed by #1038

Comments

@hadley
Copy link
Member

hadley commented Nov 28, 2019

For tidyverse/tidyr#774

@hadley hadley added this to the 0.3.0 milestone Nov 28, 2019
@hadley
Copy link
Member Author

hadley commented Apr 24, 2020

Is the hint no longer produced by vctrs? I'd think to see it in validate_unique() but stop_error() and subclasses don't seem to generate it.

Is this actually made by tibble?

@hadley
Copy link
Member Author

hadley commented Apr 24, 2020

Maybe vec_as_names() should have a repair_name argument that is passed down to validate_unique(), and then to stop_names_cannot_be_empty(), stop_names_cannot_be_dot_dot() and stop_names_must_be_unique(). If non "" (non NULL?) this would add an info bullet to the condition.

@lionel- if that sounds like basically the right approach, I'm happy to implement it.

@lionel- lionel- added the names label Apr 24, 2020
@lionel-
Copy link
Member

lionel- commented Apr 24, 2020

It'd pass down repair_arg as well? This sounds like the right approach!

@hadley
Copy link
Member Author

hadley commented Apr 24, 2020

Sorry, yeah, I meant repair_arg. I'll take a stab

hadley added a commit that referenced this issue Apr 24, 2020
hadley added a commit that referenced this issue Apr 27, 2020
lionel- pushed a commit that referenced this issue Apr 27, 2020
Squashed commit of the following:

commit 96b9a9f
Merge: f65f71c fc007b8
Author: Hadley Wickham <h.wickham@gmail.com>
Date:   Mon Apr 27 08:05:05 2020 -0500

    Finish off #1038 (#1052)

commit fc007b8
Author: Hadley Wickham <h.wickham@gmail.com>
Date:   Mon Apr 27 08:04:51 2020 -0500

    WS

commit e845d03
Merge: b384da6 f65f71c
Author: Hadley Wickham <h.wickham@gmail.com>
Date:   Mon Apr 27 08:04:07 2020 -0500

    Merge remote-tracking branch 'refs/remotes/origin/master'

    Conflicts:
    	src/names.c

commit f65f71c
Author: Hadley Wickham <h.wickham@gmail.com>
Date:   Mon Apr 27 08:02:20 2020 -0500

    Add repair_arg to vec_as_names() (#1038)

    Fixes #692

commit b384da6
Author: Hadley Wickham <h.wickham@gmail.com>
Date:   Mon Apr 27 07:53:51 2020 -0500

    No longer need explicit validation

commit 43ccf82
Author: Hadley Wickham <h.wickham@gmail.com>
Date:   Mon Apr 27 07:52:59 2020 -0500

    WS

commit f2a7d0d
Author: Hadley Wickham <h.wickham@gmail.com>
Date:   Mon Apr 27 07:25:45 2020 -0500

    Fix args_empty I missed earlier

commit b5d3e63
Merge: 7c6bf13 e904b2b
Author: Hadley Wickham <h.wickham@gmail.com>
Date:   Mon Apr 27 07:23:12 2020 -0500

    Merge remote-tracking branch 'refs/remotes/origin/master'

    Conflicts:
    	NEWS.md

commit 7c6bf13
Author: Hadley Wickham <h.wickham@gmail.com>
Date:   Mon Apr 27 07:20:36 2020 -0500

    Convert const char* to struct vctrs_arg*

    And use "argument" in hint

commit 819629d
Author: Hadley Wickham <h.wickham@gmail.com>
Date:   Fri Apr 24 13:09:26 2020 -0500

    Add repair_arg to vec_as_names()

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

Successfully merging a pull request may close this issue.

2 participants