Skip to content

Commit

Permalink
eliminate workspace (#72)
Browse files Browse the repository at this point in the history
Moves the exile crate up to the top level of the git repository and
eliminates the cargo workspace. The xtest and xdoc crates are now gone.
This closes #71
  • Loading branch information
webern authored Nov 16, 2020
1 parent b5b1ef0 commit 49a273f
Show file tree
Hide file tree
Showing 102 changed files with 84 additions and 528 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/assert-git-clean.sh

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/ci.sh

This file was deleted.

11 changes: 4 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: exile ci

on:
push:
branches: [ 'master', '*develop*', 'testgen' ]
branches: [ 'master' ]
pull_request:
branches: [ '*' ]

Expand All @@ -14,9 +14,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: rustup update stable
- run: cargo clippy -- --version && cargo fmt -- --version
- run: cargo fmt -- --check
- run: cargo clippy --locked -- -D warnings
- run: cargo clippy --tests --locked -- -D warnings
- run: cargo test --all-features
- run: cargo build --package exile --lib
- run: export EXILE_GENERATE_README=yes && make check
- name: assert git is clean
run: git diff --quiet && [[ -z $(git status -s) ]]
2 changes: 1 addition & 1 deletion .github/workflows/testgen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: testgen

on:
push:
branches: [ 'master', 'testgen', '*develop*' ]
branches: [ 'master' ]
pull_request:
branches: [ '*' ]

Expand Down
17 changes: 8 additions & 9 deletions .idea/exile.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions .idea/runConfigurations/GENERATE_readme.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions .idea/runConfigurations/GENERATE_tests.xml

This file was deleted.

15 changes: 0 additions & 15 deletions .idea/runConfigurations/Skip_Doctypes_PIs_and_Comments.xml

This file was deleted.

15 changes: 0 additions & 15 deletions .idea/runConfigurations/run_xtest_main.xml

This file was deleted.

15 changes: 0 additions & 15 deletions .idea/runConfigurations/test_xdoc.xml

This file was deleted.

14 changes: 0 additions & 14 deletions .idea/runConfigurations/workspace_clippy_tests.xml

This file was deleted.

4 changes: 0 additions & 4 deletions BRANCH-CODEGEN.md

This file was deleted.

10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Currently we are using v0.0.x where every version can and will contain breaking changes.

## [Unreleased]
## [v0.0.2] - 2020-11-15
### Added
- Support for single-quoted attributes [#58]
- `exile::load` for loading files [#58]
- A lot of work on generating test cases with Java [#67], [#70], [#72]


### Changed
- The `xdoc` `Version` and `Encoding` enums were weird, changed to remove `None` [#59]
- Added some mutating functions to `Document`, `Element`, and maybe others
- Eliminated the `xdoc` and `xtest` crates [#67], [#70], [#72]

[#58]: https://github.com/webern/exile/pull/58
[#59]: https://github.com/webern/exile/pull/59
[#67]: https://github.com/webern/exile/pull/67
[#70]: https://github.com/webern/exile/pull/70
[#72]: https://github.com/webern/exile/pull/72

## [v0.0.1] - 2020-07-18
### Added
Expand Down Expand Up @@ -47,6 +54,7 @@ Currently we are using v0.0.x where every version can and will contain breaking

<!-- version diff links -->
[Unreleased]: https://github.com/webern/exile/compare/v0.0.1...HEAD
[v0.0.2]: https://github.com/webern/exile/compare/v0.0.1...v0.0.2
[v0.0.1]: https://github.com/webern/exile/compare/v0.0.0...v0.0.1
[v0.0.0]: https://github.com/webern/exile/releases/tag/v0.0.0
[30175b0]: https://github.com/webern/exile/compare/dd000e2..30175b0
Expand Down
20 changes: 16 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
[workspace]
[package]
name = "exile"
description = "Nacent XML DOM Library"
authors = ["Matthew James Briggs <[email protected]>"]
categories = ["encoding", "parser-implementations", "parsing"]
edition = "2018"
exclude = ["tests/"]
keywords = ["xml"]
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/webern/exile/"
version = "0.0.2"

members = [
"exile"
]
[dependencies]

[build-dependencies]
cargo-readme = "3.2.0"
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: clean testgen
.PHONY: clean testgen check

## data/w3cdata: creates the data directory by pulling testdata from dockerhub
data/w3cdata:
Expand All @@ -20,3 +20,12 @@ testgen: testdata
clean:
rm -rf data && \
rm -rf target

check:
cargo clippy -- --version && cargo fmt -- --version && \
cargo fmt -- --check && \
cargo clippy --locked -- -D warnings && \
cargo clippy --tests --locked -- -D warnings && \
cargo test --all-features && \
cargo build --all-features --lib

46 changes: 18 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,23 @@ Current version: 0.0.2

`exile` is a Rust library for reading and writing XML.

The goal is to provide a useful abstraction over XML with DOM-like structs.
The state of the library is 'pre-alpha'
See the GitHub issues and [milestones](https://github.com/webern/exile/milestones) for work planned.
The goal, at least initially, is to provide an abstract syntax tree of an XML file.
As such, this is a Exile is a dom parser and loads the complete contents of the document into memory.

Currently supported:
- Elements
- Attributes
- Text Nodes
- Processing Instructions
- UTF-8

Not Supported:
- Entities
- Entity References
- Doctypes
- Comment Parsing
- Other Encodings
- Whitespace Preservation

## Example

Expand Down Expand Up @@ -51,28 +65,4 @@ The program above prints:
<my_root foo="bar">
<my_child>Hello World!</my_child>
</my_root>
```

## Crates

Development is setup as a cargo workspace with three crates.

* `xdoc` is the root dependency and contains structs that represent an XML document
* `xtest` contains test files and helper functions for loading them.
* `exile` is the public-facing crate and includes the parser.

## Work to Do

Current status is 'pre-mvp'. v0.0.0 will be able to parse basic XML documents into DOM-like
structures and serialize them back.

* [x] [MVP]
* [ ] [Conformance]
* [ ] [Interface]

[Issues not assigned to a milestone]

[MVP]: https://github.com/webern/exile/milestone/1
[Conformance]: https://github.com/webern/exile/milestone/3
[Interface]: https://github.com/webern/exile/milestone/2
[Issues not assigned to a milestone]: https://github.com/webern/exile/issues?q=is%3Aissue+is%3Aopen+no%3Amilestone
```
7 changes: 0 additions & 7 deletions exile/build.rs → build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ fn generate_readme() {
true, // indent headings
)
.unwrap();
let this_readme_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("README.md");
let mut readme = File::create("README.md").unwrap();
readme.write_all(content.as_bytes()).unwrap();
let top_readme_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("..")
.join("README.md");
if env::var_os("EXILE_GENERATE_TOP_README").is_some() {
std::fs::copy(&this_readme_path, &top_readme_path).unwrap();
}
}
9 changes: 0 additions & 9 deletions check.sh

This file was deleted.

Loading

0 comments on commit 49a273f

Please sign in to comment.