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

[vincentlaucsb-csv-parser] New port #32780

Merged
merged 10 commits into from
Jul 28, 2023
Merged

Conversation

xiaozhuai
Copy link
Contributor

@xiaozhuai xiaozhuai commented Jul 27, 2023

  • Changes comply with the maintainer guide
  • The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines.
  • Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all find_package calls are REQUIRED, are satisfied by vcpkg.json's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx
  • The versioning scheme in vcpkg.json matches what upstream says.
  • The license declaration in vcpkg.json matches what upstream says.
  • The installed as the "copyright" file matches what upstream says.
  • The source code of the component installed comes from an authoritative source.
  • The generated "usage text" is accurate. See adding-usage for context.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is in the new port's versions file.
  • Only one version is added to each modified port's versions file.

Close #32759


The following usage test passed on x64-osx-release

#include <iostream>
#include "csv.hpp"

int main() {
    csv::CSVFormat format;
    csv::CSVReader reader("addresses.csv", format);
    for (auto &row: reader) {
        for (auto &col: row) {
            std::cout << col.get<std::string>() << " ";
        }
        std::cout << std::endl;
    }
    return 0;
}
John,Doe,120 jefferson st.,Riverside, NJ, 08075
Jack,McGinnis,220 hobo Av.,Phila, PA,09119
"John ""Da Man""",Repici,120 Jefferson St.,Riverside, NJ,08075
Stephen,Tyler,"7452 Terrace ""At the Plaza"" road",SomeTown,SD, 91234
,Blankman,,SomeTown, SD, 00298
"Joan ""the bone"", Anne",Jet,"9th, at Terrace plc",Desert City,CO,00123

cmake_minimum_required(VERSION 3.15)
project(test_csv_parser)

set(CMAKE_CXX_STANDARD 17)

find_package(unofficial-vincentlaucsb-csv-parser CONFIG REQUIRED)

add_executable(test_csv_parser main.cpp)
target_link_libraries(test_csv_parser PRIVATE unofficial::vincentlaucsb-csv-parser::csv)

@Cheney-W Cheney-W added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Jul 27, 2023
@Cheney-W
Copy link
Contributor

Port name should be vincentlaucsb-csv-parser instead of csv-parser.

Moving the PR to draft. Please set it to "ready for review" once changes have been applied.

@Cheney-W Cheney-W marked this pull request as draft July 27, 2023 06:43
@xiaozhuai xiaozhuai changed the title [csv-parser] New port [vincentlaucsb-csv-parser] New port Jul 27, 2023
@xiaozhuai xiaozhuai marked this pull request as ready for review July 27, 2023 07:33
@xiaozhuai
Copy link
Contributor Author

Port name should be vincentlaucsb-csv-parser instead of csv-parser.

@Cheney-W
Done~

Cheney-W
Cheney-W previously approved these changes Jul 27, 2023
@Cheney-W Cheney-W added the info:reviewed Pull Request changes follow basic guidelines label Jul 27, 2023
@BillyONeal
Copy link
Member

Unfortunately several names this port wants:

x86-windows/debug/lib/csv.lib
x86-windows/debug/lib/csv.lib
x86-windows/include/csv/csv.hpp
x86-windows/include/csv/internal/basic_csv_parser.hpp
x86-windows/include/csv/internal/col_names.hpp
x86-windows/include/csv/internal/common.hpp
x86-windows/include/csv/internal/csv_format.hpp
x86-windows/include/csv/internal/csv_reader.hpp
x86-windows/include/csv/internal/csv_row.hpp
x86-windows/include/csv/internal/csv_stat.hpp
x86-windows/include/csv/internal/csv_utility.hpp
x86-windows/include/csv/internal/csv_writer.hpp
x86-windows/include/csv/internal/data_type.h
x86-windows/lib/csv.lib
x86-windows/share/unofficial-vincentlaucsb-csv-parser/unofficial-vincentlaucsb-csv-parser-config-debug.cmake
x86-windows/share/unofficial-vincentlaucsb-csv-parser/unofficial-vincentlaucsb-csv-parser-config-release.cmake
x86-windows/share/unofficial-vincentlaucsb-csv-parser/unofficial-vincentlaucsb-csv-parser-config.cmake
x86-windows/share/vincentlaucsb-csv-parser/copyright
x86-windows/share/vincentlaucsb-csv-parser/usage
x86-windows/share/vincentlaucsb-csv-parser/vcpkg.spdx.json
x86-windows/share/vincentlaucsb-csv-parser/vcpkg_abi_info.txt

are already taken by libcsv:

libcsv:x64-windows:/debug/lib/csv.lib
libcsv:x64-windows:/include/csv.h
libcsv:x64-windows:/lib/csv.lib
libcsv:x64-windows:/share/libcsv/copyright
libcsv:x64-windows:/share/libcsv/man3/csv.3
libcsv:x64-windows:/share/libcsv/vcpkg.spdx.json
libcsv:x64-windows:/share/libcsv/vcpkg_abi_info.txt

Borderline since they want the same directory:

p-ranav-csv:x64-windows:/include/csv/concurrent_queue.hpp
p-ranav-csv:x64-windows:/include/csv/dialect.hpp
p-ranav-csv:x64-windows:/include/csv/reader.hpp
p-ranav-csv:x64-windows:/include/csv/robin_hood.hpp
p-ranav-csv:x64-windows:/include/csv/writer.hpp

I think we need to patch the include paths and lib name?

@BillyONeal BillyONeal removed the info:reviewed Pull Request changes follow basic guidelines label Jul 27, 2023
@BillyONeal BillyONeal marked this pull request as draft July 27, 2023 16:44
@xiaozhuai
Copy link
Contributor Author

@BillyONeal

I think we need to patch the include paths and lib name?

Sure. Here is what looks like after patched.

x64-osx-release/
x64-osx-release/include/
x64-osx-release/include/vincentlaucsb-csv-parser/
x64-osx-release/include/vincentlaucsb-csv-parser/csv.hpp
x64-osx-release/include/vincentlaucsb-csv-parser/internal/
x64-osx-release/include/vincentlaucsb-csv-parser/internal/basic_csv_parser.hpp
x64-osx-release/include/vincentlaucsb-csv-parser/internal/col_names.hpp
x64-osx-release/include/vincentlaucsb-csv-parser/internal/common.hpp
x64-osx-release/include/vincentlaucsb-csv-parser/internal/csv_format.hpp
x64-osx-release/include/vincentlaucsb-csv-parser/internal/csv_reader.hpp
x64-osx-release/include/vincentlaucsb-csv-parser/internal/csv_row.hpp
x64-osx-release/include/vincentlaucsb-csv-parser/internal/csv_stat.hpp
x64-osx-release/include/vincentlaucsb-csv-parser/internal/csv_utility.hpp
x64-osx-release/include/vincentlaucsb-csv-parser/internal/csv_writer.hpp
x64-osx-release/include/vincentlaucsb-csv-parser/internal/data_type.h
x64-osx-release/lib/
x64-osx-release/lib/libvincentlaucsb-csv-parser-csv.a
x64-osx-release/share/
x64-osx-release/share/unofficial-vincentlaucsb-csv-parser/
x64-osx-release/share/unofficial-vincentlaucsb-csv-parser/unofficial-vincentlaucsb-csv-parser-config-release.cmake
x64-osx-release/share/unofficial-vincentlaucsb-csv-parser/unofficial-vincentlaucsb-csv-parser-config.cmake
x64-osx-release/share/vincentlaucsb-csv-parser/
x64-osx-release/share/vincentlaucsb-csv-parser/copyright
x64-osx-release/share/vincentlaucsb-csv-parser/usage
x64-osx-release/share/vincentlaucsb-csv-parser/vcpkg.spdx.json
x64-osx-release/share/vincentlaucsb-csv-parser/vcpkg_abi_info.txt

@xiaozhuai
Copy link
Contributor Author

@Cheney-W The CI seems broken, please rerun CI.

@BillyONeal
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@xiaozhuai xiaozhuai marked this pull request as ready for review July 28, 2023 06:00
@Cheney-W Cheney-W added the info:reviewed Pull Request changes follow basic guidelines label Jul 28, 2023
@BillyONeal BillyONeal merged commit 0d8b396 into microsoft:master Jul 28, 2023
15 checks passed
@BillyONeal
Copy link
Member

Thanks for the new port and sorry about needing to deal with the crowded field

@xiaozhuai xiaozhuai deleted the dev-csv-parser branch July 31, 2023 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[New Port Request] vincentlaucsb-csv-parser
3 participants