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

Feedback #3

Closed
nedtwigg opened this issue Oct 8, 2018 · 11 comments
Closed

Feedback #3

nedtwigg opened this issue Oct 8, 2018 · 11 comments

Comments

@nedtwigg
Copy link
Contributor

nedtwigg commented Oct 8, 2018

contributing instructions / maven / lombok noob problems

This looks great! I'm a gradle partisan and very ignorant of maven, maybe I'm doing something wrong?

With maven 3.5.3 on java 1.8, if I run mvn install from the root, I get a bunch of errors like this:

testMultipleDimArrayComplexFromMatlabCreatedFile(us.hebi.matlab.io.mat.mat5test.ArrayReadTest)  Time elapsed: 0.003 sec  <<< ERROR!
java.lang.Error: Unresolved compilation problem: 
	The constructor Mat5Tag(Mat5Type, int, boolean, Source) is undefined

	at us.hebi.matlab.io.mat.Mat5Tag.readTag(Mat5Tag.java:97)
	at us.hebi.matlab.io.mat.Mat5Tag.readTagOrNull(Mat5Tag.java:65)
	at us.hebi.matlab.io.mat.Mat5Reader.readContent(Mat5Reader.java:125)
	at us.hebi.matlab.io.mat.Mat5Reader.readFile(Mat5Reader.java:91)

Do I need to do some kind of system-wide install of lombok? I'm also having a hard time getting it up and building in eclipse. I've had good luck on my opensource projects having a CONTRIBUTING.md with just a few lines on how to build the project and get it setup in an IDE if there's anything unusual about it.

Silencer

https://github.com/ennerf/MatlabTools/blob/0a0ecaee16d91350c379b3935c786a4626a6d884/io/src/main/java/us/hebi/matlab/common/util/Silencer.java#L68-L76

Can this be rethrow new RuntimeException? I think I'd want to know if I was getting IOExceptions on close, especially if I'm writing.

@ennerf
Copy link
Collaborator

ennerf commented Oct 8, 2018

Thanks for taking a look. Just checking out and running "mvn package" always worked for me, but you're not the first one to complain about issues with Lombok. I'm not sure what causes it, but I'll go ahead and remove the dependency.

@ennerf ennerf mentioned this issue Oct 8, 2018
@nedtwigg
Copy link
Contributor Author

nedtwigg commented Oct 8, 2018

Huh. mvn package is giving me the same error I copy-pasted above. I'm a big fan of annotation processors, and I know gradle has strong support for lombok, I just don't know how to make the maven build go. Having a free CI build setup with Travis or circleci might help figure out what's missing for clean-install users.

@nedtwigg
Copy link
Contributor Author

nedtwigg commented Oct 8, 2018

I just pulled, and now mvn package works for me. That works too :) I'll try a little integration work tomorrow.

@ennerf
Copy link
Collaborator

ennerf commented Oct 8, 2018

Thanks. I'm mainly looking for feedback on the API and parts that'd be difficult to change in a backwards compatible way, e.g., unclear naming, non-obvious "magic", inappropriate separation of concerns, missing features, etc.

I'm mainly using Silencer::close to make sure that it tries to close all contained elements (e.g. a collection of arrays inside struct) rather than stopping if any one throws an error (e.g. the 2nd one may close properly even if the 1st one fails). What do you think about trying to close everything, and re-throw the first encountered IOException?

@nedtwigg
Copy link
Contributor Author

nedtwigg commented Oct 9, 2018

make sure that it tries to close all contained elements (e.g. a collection of arrays inside struct) rather than stopping if any one throws an error

My personal opinion on IO errors is that if any one part goes wrong, it's likely that the user is going to have to proactively take action to fix it. It might be possible to contain an error, but my experience has been that complex error handling can hide the root cause from the user (making it harder to fix), and usually the user is still going to have to take action anyway, so the even if the complex error handling doesn't obscure the error, it still doesn't save the end user much time.

I definitely wouldn't swallow it (very frustrating to not find out that your data silently didn't actually write, especially if just part of the data didn't write), and I tend to think it's not worth the effort to be fancy, but it's your lib :)

@nedtwigg
Copy link
Contributor Author

nedtwigg commented Oct 9, 2018

I'm on a couple flights today, I'm tinkering with integration to give API feedback as requested.

@ennerf
Copy link
Collaborator

ennerf commented Oct 29, 2018

I think I cleaned up most of the rough edges that were still bothering me. I'm planning on releasing a 1.0 into Maven Central this week.

I assume you're swamped, so I'll go ahead and close this issue. Feel free to re-open if you ever run into anything.

@ennerf ennerf closed this as completed Oct 29, 2018
@nedtwigg
Copy link
Contributor Author

Sorry for slow response. I did a decent amount of integration work, and I never encountered any hiccups. The API looks great! Congrats on 1.0 release, once it's on Maven I'll link to it from MatFileRW when you're ready.

If you're planning on taking community contributions, I would highly recommend

I've found that having those two things setup greatly reduces my workload.

@ennerf
Copy link
Collaborator

ennerf commented Oct 30, 2018

Awesome, that's great to hear!

I haven't worked with Travis before, but I'll try to get it setup shortly. I'm currently using a private Jenkins server, but currently others wouldn't be able to see what happened if something failed.

Does Spotless by any chance come with a configuration that matches the default settings of IntelliJ IDEA?

@nedtwigg
Copy link
Contributor Author

There is no support for the IntelliJ formatter right now, but it is on the todo: diffplug/spotless#200

@ennerf
Copy link
Collaborator

ennerf commented Oct 31, 2018

Uploading to Maven central turned out to be a bit of a pain, but it's finally live!

I ran into a few issues with the release process, so I initially uploaded it as version 0.x. Assuming that I don't encounter any more integration issues, I'll make the next release 1.0.

<dependency>
    <groupId>us.hebi.matlab</groupId>
    <artifactId>mat-file-io</artifactId>
    <version>0.1.1</version>
</dependency>

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

No branches or pull requests

2 participants