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

Change .name_repair for name_repair for consistency #762

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

olivroy
Copy link

@olivroy olivroy commented Jan 2, 2025

The idea is that no dot is required since other function arguments don't contain dots. In haven and readr, there is no dot in name_repair either.

I was not able to compile locally (RStudio, Windows, R 4.4.)... Maybe you have a hint of what's going on.

Check log

> document()
ℹ Updating readxl documentation
ℹ Loading readxl
ℹ 8 functions decorated with [[cpp11::register]]
✔ generated file cpp11.R
✔ generated file cpp11.cpp
ℹ Re-compiling readxl (debug build)
── R CMD INSTALL ────────────────────────────────────────────────────────────────────────────────────────────────────────────
─  installing *source* package 'readxl' ... (1.8s)
   ** using staged installation
   ** libs
   using C compiler: 'gcc.exe (GCC) 13.2.0'
   using C++ compiler: 'G__~1.EXE (GCC) 13.2.0'
   g++ -std=gnu++17  -I"C:/PROGRA~1/R/R-44~1.1/include" -DNDEBUG -Iwindows -I. -D__USE_MINGW_ANSI_STDIO -I'C:/Users/RoyO/AppData/Local/R/win-library/4.4/cpp11/include' -I'C:/Users/RoyO/AppData/Local/R/win-library/4.4/progress/include'   -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall -gdwarf-2 -mfpmath=sse -msse2 -mstackrealign  -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c cpp11.cpp -o cpp11.o
   g++ -std=gnu++17  -I"C:/PROGRA~1/R/R-44~1.1/include" -DNDEBUG -Iwindows -I. -D__USE_MINGW_ANSI_STDIO -I'C:/Users/RoyO/AppData/Local/R/win-library/4.4/cpp11/include' -I'C:/Users/RoyO/AppData/Local/R/win-library/4.4/progress/include'   -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall -gdwarf-2 -mfpmath=sse -msse2 -mstackrealign  -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c XlsWorkBook.cpp -o XlsWorkBook.o
   g++ -std=gnu++17  -I"C:/PROGRA~1/R/R-44~1.1/include" -DNDEBUG -Iwindows -I. -D__USE_MINGW_ANSI_STDIO -I'C:/Users/RoyO/AppData/Local/R/win-library/4.4/cpp11/include' -I'C:/Users/RoyO/AppData/Local/R/win-library/4.4/progress/include'   -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall -gdwarf-2 -mfpmath=sse -msse2 -mstackrealign  -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c XlsxWorkBook.cpp -o XlsxWorkBook.o
   In file included from 1mC:/rtools44/x86_64-w64-mingw32.static.posix/lib/gcc/x86_64-w64-mingw32.static.posix/13.2.0/include/c++/cassert:44,
                    from 1mrapidxml/rapidxml.h:12,
                    from 1mXlsxString.h:3,
                    from 1mXlsxWorkBook.h:5,
                    from 1mXlsxWorkBook.cpp:1:
   1mrapidxml/rapidxml.h: In member function '1mCh* rapidxml::memory_pool<Ch>::1;32mallocate_string(const Ch*, std::size_t)':
   1mrapidxml/rapidxml.h:488:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
     488 |             1;31massert(source || size);     // Either source or size (or both) must be specified
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h:488:13: 1;36mnote: (if you use '1m-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
   1mrapidxml/rapidxml.h: In member function '1mvoid rapidxml::memory_pool<Ch>::1;32mset_allocator(void* (*)(std::size_t), void (*)(void*))':
   1mrapidxml/rapidxml.h:564:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
     564 |             1;31massert(m_begin == m_static_memory && m_ptr == align(m_begin));    // Verify that no memory is allocated yet
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h: In member function '1mchar* rapidxml::memory_pool<Ch>::1;32mallocate_raw(std::size_t)':
   1mrapidxml/rapidxml.h:596:17: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
     596 |                 1;31massert(memory); // Allocator is not allowed to return 0, on failure it must either throw, stop the program or use longjmp
         |                 1;31m^~~~~~
   1mrapidxml/rapidxml.h: In member function '1mrapidxml::xml_node<Ch>* rapidxml::xml_node<Ch>::1;32mlast_node(const Ch*, std::size_t, bool) const':
   1mrapidxml/rapidxml.h:970:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
     970 |             1;31massert(m_first_node);  // Cannot query for last child if node has no children
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h: In member function '1mrapidxml::xml_node<Ch>* rapidxml::xml_node<Ch>::1;32mprevious_sibling(const Ch*, std::size_t, bool) const':
   1mrapidxml/rapidxml.h:993:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
     993 |             1;31massert(this->m_parent);     // Cannot query for siblings if node has no parent
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h: In member function '1mrapidxml::xml_node<Ch>* rapidxml::xml_node<Ch>::1;32mnext_sibling(const Ch*, std::size_t, bool) const':
   1mrapidxml/rapidxml.h:1016:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
    1016 |             1;31massert(this->m_parent);     // Cannot query for siblings if node has no parent
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h: In member function '1mvoid rapidxml::xml_node<Ch>::1;32mprepend_node(rapidxml::xml_node<Ch>*)':
   1mrapidxml/rapidxml.h:1088:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
    1088 |             1;31massert(child && !child->parent() && child->type() != node_document);
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h: In member function '1mvoid rapidxml::xml_node<Ch>::1;32mappend_node(rapidxml::xml_node<Ch>*)':
   1mrapidxml/rapidxml.h:1109:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
    1109 |             1;31massert(child && !child->parent() && child->type() != node_document);
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h: In member function '1mvoid rapidxml::xml_node<Ch>::1;32minsert_node(rapidxml::xml_node<Ch>*, rapidxml::xml_node<Ch>*)':
   1mrapidxml/rapidxml.h:1131:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
    1131 |             1;31massert(!where || where->parent() == this);
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h:1132:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
    1132 |             1;31massert(child && !child->parent() && child->type() != node_document);
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h: In member function '1mvoid rapidxml::xml_node<Ch>::1;32mremove_first_node()':
   1mrapidxml/rapidxml.h:1152:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
    1152 |             1;31massert(first_node());
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h: In member function '1mvoid rapidxml::xml_node<Ch>::1;32mremove_last_node()':
   1mrapidxml/rapidxml.h:1167:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
    1167 |             1;31massert(first_node());
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h: In member function '1mvoid rapidxml::xml_node<Ch>::1;32mremove_node(rapidxml::xml_node<Ch>*)':
   1mrapidxml/rapidxml.h:1183:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
    1183 |             1;31massert(where && where->parent() == this);
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h:1184:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
    1184 |             1;31massert(first_node());
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h: In member function '1mvoid rapidxml::xml_node<Ch>::1;32mprepend_attribute(rapidxml::xml_attribute<Ch>*)':
   1mrapidxml/rapidxml.h:1209:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
    1209 |             1;31massert(attribute && !attribute->parent());
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h: In member function '1mvoid rapidxml::xml_node<Ch>::1;32mappend_attribute(rapidxml::xml_attribute<Ch>*)':
   1mrapidxml/rapidxml.h:1229:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
    1229 |             1;31massert(attribute && !attribute->parent());
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h: In member function '1mvoid rapidxml::xml_node<Ch>::1;32minsert_attribute(rapidxml::xml_attribute<Ch>*, rapidxml::xml_attribute<Ch>*)':
   1mrapidxml/rapidxml.h:1251:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
    1251 |             1;31massert(!where || where->parent() == this);
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h:1252:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
    1252 |             1;31massert(attribute && !attribute->parent());
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h: In member function '1mvoid rapidxml::xml_node<Ch>::1;32mremove_first_attribute()':
   1mrapidxml/rapidxml.h:1272:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
    1272 |             1;31massert(first_attribute());
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h: In member function '1mvoid rapidxml::xml_node<Ch>::1;32mremove_last_attribute()':
   1mrapidxml/rapidxml.h:1289:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
    1289 |             1;31massert(first_attribute());
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h: In member function '1mvoid rapidxml::xml_node<Ch>::1;32mremove_attribute(rapidxml::xml_attribute<Ch>*)':
   1mrapidxml/rapidxml.h:1305:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
    1305 |             1;31massert(first_attribute() && where->parent() == this);
         |             1;31m^~~~~~
   1mrapidxml/rapidxml.h: In member function '1mvoid rapidxml::xml_document<Ch>::1;32mparse(Ch*)':
   1mrapidxml/rapidxml.h:1393:13: 1;31merror: there are no arguments to '1m_assert' that depend on a template parameter, so a declaration of '1m_assert' must be available [1;31m-fpermissive]
    1393 |             1;31massert(text);
         |             1;31m^~~~~~
   rapidxml/rapidxml.h: In instantiation of '1mrapidxml::xml_node<Ch>* rapidxml::xml_node<Ch>::1;32mnext_sibling(const Ch*, std::size_t, bool) const 5m[with Ch = char; std::size_t = long long unsigned int]':
   1mXlsxString.h:63:27:   required from here
   1mrapidxml/rapidxml.h:1016:13: 1;31merror: '1m_assert' was not declared in this scope; did you mean '1mxls::_assert'?
    1016 |             1;31massert(this->m_parent);     // Cannot query for siblings if node has no parent
         |             1;31m^~~~~~
   In file included from 1mC:/rtools44/x86_64-w64-mingw32.static.posix/lib/gcc/x86_64-w64-mingw32.static.posix/13.2.0/include/c++/cassert:44,
                    from 1m./cran.h:10,
                    from 1m./libxls/xlstypes.h:41,
                    from 1mlibxls/xls.h:42,
                    from 1mColSpec.h:6,
                    from 1mXlsxWorkBook.h:3:
   1mC:/rtools44/x86_64-w64-mingw32.static.posix/include/assert.h:25:46: 1;36mnote: '1mxls::_assert' declared here
      25 | _CRTIMP void __cdecl __MINGW_ATTRIB_NORETURN 1;36m_assert (const char *_Message, const char *_File, unsigned _Line);
         |                                              1;36m^~~~~~~
   rapidxml/rapidxml.h: In instantiation of '1mvoid rapidxml::xml_document<Ch>::1;32mparse(Ch*) 5m[with int Flags = 4096; Ch = char]':
   1mXlsxWorkBook.h:33:59:   required from here
   1mrapidxml/rapidxml.h:1393:13: 1;31merror: '1m_assert' was not declared in this scope; did you mean '1mxls::_assert'?
    1393 |             1;31massert(text);
         |             1;31m^~~~~~
   1mC:/rtools44/x86_64-w64-mingw32.static.posix/include/assert.h:25:46: 1;36mnote: '1mxls::_assert' declared here
      25 | _CRTIMP void __cdecl __MINGW_ATTRIB_NORETURN 1;36m_assert (const char *_Message, const char *_File, unsigned _Line);
         |                                              1;36m^~~~~~~
   make: *** [C:/PROGRA~1/R/R-44~1.1/etc/x64/Makeconf:296: XlsxWorkBook.o] Error 1
   ERROR: compilation failed for package 'readxl'
─  removing 'C:/Users/RoyO/AppData/Local/Temp/RtmpCUa8J9/devtools_install_33f049a53954/readxl'
Error in `(function (command = NULL, args = character(), error_on_status = TRUE, …`:
! System command 'Rcmd.exe' failed
---
Exit status: 1
stdout & stderr: <printed>
---

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

Successfully merging this pull request may close these issues.

1 participant