blachlylab / dhtslib

D bindings and OOP wrappers for htslib
MIT License
7 stars 1 forks source link

Publicly imported hFILE #30

Closed charlesgregory closed 5 years ago

charlesgregory commented 5 years ago

Received this error reguarding the SAMWriter ctor. It seems that we have two different hFILE structs. I have changed hts.d to use the hFILE struct in hfile.d instead of an opaque struct.

dhtslib/source/dhtslib/sam.d(1115,32): Error: function dhtslib.htslib.hts.hts_hopen(hFILE* fp,
 const(char)* fn, const(char)* mode) is not callable using argument types (hFILE*, immutable(char)*, char*)
dhtslib/source/dhtslib/sam.d(1115,32):        cannot pass argument this.f of type
 dhtslib.htslib.hfile.hFILE* to parameter dhtslib.htslib.hts.hFILE* fp

https://github.com/blachlylab/dhtslib/blob/4b2389370d8bdeed9f36841d6779cf5a27ce2e2e/source/dhtslib/sam.d#L1109-L1116

jblachly commented 5 years ago

why public import?

charlesgregory commented 5 years ago

Removed public import statement.

jblachly commented 5 years ago

please try to match existing style; selective imports should be of form

import package.subpackage: symbol; or import package.subpackage : symbol;

( believe official Dlang recommendation is the latter , you can run it thru dfmt to be sure)

charlesgregory commented 5 years ago

I merged this in the command line using squash.