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

CodeGen input and output streams #80

Closed

Conversation

Daquiver1
Copy link
Contributor

No description provided.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 15, 2023
@michalgr
Copy link
Contributor

At this point, more than actual implementation we care about having the interface ready. It's fine to define those streams as abstract base classes.

We want asynchronous streams that can read and write all the PrimitiveTypes and IntegralTypes. Those streams will need to be implemented by hand (unfortunately) and they will need to depend on the types you generated in PR #76. Because of that I think we need to start building code you generated with BUCK. Before we get to this and later PRs we need to:

  1. Create a python_binary rule that prints code (new types to begin with) to stdout
  2. Add a genrule that runs the binary and produces a generated python file
  3. Add a python module (jdwp/runtime ?) that will contain the generated code and will be built by buck like any other python code we have
  4. Add the streams you're working on in this PR to that runtime module

Daquiver1 and others added 18 commits November 23, 2023 02:11
* add array support for JDWP DSL

* fix schema bugs

* update arraytype in AllClasses command

* update arraytype in AllClasses command

remove error type

* fix out and reply mismatch
fix checkers

fix: union none to empty set
schema.py type-checks, but raises exception at runtime because Struct is
referenced before it is defined. This commit
- moves definition of Type to the top
- uses string names for forward type references
- replaces T with covariant TypeT
- fixes missing type parameter in Struct definition
* Added newtype support for primitive type enum

* Make newgen generator automatic

* Changed type of jdwp_type and changed default type to int

* Wrote test to validate primitive type mapping

* Added test for type alias definition

* Factored out function defining type alias.

* Used absolute name format for newtype

* Changed testing framework to unittest

* Added dependency for jdwp project

* Added int and string type

* Changed the expected start

* Updated test and removed int and byte from primitive types.

* Removed int and boolean type from new type generator

* doc: add copyright
* add array support for JDWP DSL

* fix schema bugs

* update arraytype in AllClasses command

* update arraytype in AllClasses command

remove error type

* fix out and reply mismatch
schema.py type-checks, but raises exception at runtime because Struct is
referenced before it is defined. This commit
- moves definition of Type to the top
- uses string names for forward type references
- replaces T with covariant TypeT
- fixes missing type parameter in Struct definition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants