Skip to content

Enable strict compiler settings #413

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

Merged
merged 42 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
15e39ec
enable compiler warnings and linting
bpkroth Dec 7, 2023
d66eaba
address some trailing whitespace warnings
bpkroth Dec 7, 2023
9fde340
Merge branch 'main' into strict-compiler
bpkroth Dec 8, 2023
3b3906c
compiler fixups
bpkroth Dec 8, 2023
092e06d
compiler fixups
bpkroth Dec 8, 2023
8038636
add some warning suppressions for unused variables
bpkroth Dec 8, 2023
139c953
omit those entirely
bpkroth Dec 8, 2023
259cca6
fixups
bpkroth Dec 8, 2023
77c74ae
whitespace
bpkroth Dec 8, 2023
7abe2e8
use autoclose
bpkroth Dec 8, 2023
a3f7fec
remove more suppressed cast issues
bpkroth Dec 8, 2023
554406d
unnecessary cast
bpkroth Dec 8, 2023
79e7187
avoid unused errors
bpkroth Dec 8, 2023
d93caf7
add serialization requirements
bpkroth Dec 8, 2023
7f89237
whitespace
bpkroth Dec 8, 2023
ff5507d
more minor avoid raw type issues
bpkroth Dec 8, 2023
fc97c1e
in the couple of utility classes, just suppress more warnings
bpkroth Dec 8, 2023
5220c3f
convert throw type to avoid InterruptedException handling warnings
bpkroth Dec 8, 2023
df432f3
docs
bpkroth Dec 8, 2023
d93c61d
enable deprecations
bpkroth Dec 8, 2023
b0398b1
more compiler warning fixups
bpkroth Dec 8, 2023
db891e9
Merge branch 'main' into strict-compiler
bpkroth Dec 8, 2023
c53ea80
revert order
bpkroth Dec 8, 2023
e5e9c00
need the col++
bpkroth Dec 8, 2023
94385e7
address some unused and other lint issues
bpkroth Dec 8, 2023
448ca24
fixup
bpkroth Dec 8, 2023
1e411d4
fixup
bpkroth Dec 8, 2023
2937b46
add a readme with additional developer notes per PR suggestion
bpkroth Dec 11, 2023
4b22f8d
tweak comment
bpkroth Dec 11, 2023
fa34754
add more developer notes
bpkroth Dec 11, 2023
be0f414
include some extension recommendations
bpkroth Dec 11, 2023
43b5cee
update extensions
bpkroth Dec 11, 2023
4556f10
address more unused warnings
bpkroth Dec 11, 2023
5939e2d
ignore another error
bpkroth Dec 11, 2023
4f0fe4c
Merge branch 'main' into strict-compiler
bpkroth Dec 13, 2023
ebb52de
addressing some new serialization warnings
bpkroth Dec 13, 2023
adb1a96
comments
bpkroth Dec 13, 2023
acd47aa
adjust constructor to avoid this-escape errors
bpkroth Dec 13, 2023
d350c6e
convert a pile of classes to 'final' to avoid this-escape errors
bpkroth Dec 13, 2023
3437b2d
auto-whitespace
bpkroth Dec 13, 2023
b2e7489
comments about this-escape warnings
bpkroth Dec 13, 2023
b526294
exception
bpkroth Dec 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add a readme with additional developer notes per PR suggestion
  • Loading branch information
bpkroth committed Dec 11, 2023
commit 2937b469f3e21d5bc1e5580b9f5ec969321e0c32
58 changes: 58 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Contributing

We welcome all contributions! Please open a [pull request](https://github.com/cmu-db/benchbase/pulls). Common contributions may include:

- Adding support for a new DBMS.
- Adding more tests of existing benchmarks.
- Fixing any bugs or known issues.

## Contents

<!-- TOC -->

- [Contributing](#contributing)
- [Contents](#contents)
- [IDE](#ide)
- [Adding a new DBMS](#adding-a-new-dbms)
- [Java Development Notes](#java-development-notes)
- [Compiler Warnings](#compiler-warnings)
- [Alternatives to arrays of generics](#alternatives-to-arrays-of-generics)

<!-- /TOC -->

## IDE

Although you can use any IDE you prefer, there are some configurations for [VSCode](https://code.visualstudio.com/) that you may find useful included in the repository, including [Github Codespaces](https://github.com/features/codespaces) and [VSCode devcontainer](https://code.visualstudio.com/docs/remote/containers) support to automatically handle dependencies, environment setup, code formatting, and more.

## Adding a new DBMS

Please see the existing MySQL and PostgreSQL code for an example.

## Java Development Notes

### Compiler Warnings

In an effort to enforce clean, safe, maintainable code, [PR #413](https://github.com/cmu-db/benchbase/pull/413) enabled the `-Werror` and `-Xlint:all` options for the `javac` compiler.

This means that any compiler warnings will cause the build to fail.

If you are seeing a build failure due to a compiler warning, please fix the warning or (on rare occassions) add an exception to the line causing the issue.

#### Alternatives to arrays of generics

Per the [Java Language Specification](https://docs.oracle.com/javase/tutorial/java/generics/restrictions.html#createArrays), arrays of generic types are not allowed and will cause compiler warnings (e.g., `unchecked cast`)

In some cases, you can extend a generic type to create a non-generic type that can be used in an array.

For instance,

```java
// Simple generic class overload to avoid some cast warnings.
class SomeTypeList extends LinkedList<SomeType> {}

SomeTypeList[] someTypeLists = new SomeTypeList[] {
new SomeTypeList(),
new SomeTypeList(),
new SomeTypeList(),
};
```
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,17 @@ Please see the existing MySQL and PostgreSQL code for an example.

## Contributing

We welcome all contributions! Please open a pull request. Common contributions may include:
We welcome all contributions! Please open a [pull request](https://github.com/cmu-db/benchbase/pulls). Common contributions may include:

- Adding support for a new DBMS.
- Adding more tests of existing benchmarks.
- Fixing any bugs or known issues.

Please see the [CONTRIBUTING.md](./CONTRIBUTING.md) for addition notes.

## Known Issues

Please use GitHub's issue tracker for all issues.
Please use [GitHub's issue tracker](https://github.com/cmu-db/benchbase/issues) for all issues.

## Credits

Expand Down