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

Deprecate paramsMaker #667

Closed
cdupuis opened this Issue Jan 30, 2019 · 4 comments

Comments

Projects
None yet
3 participants
@cdupuis
Copy link
Contributor

cdupuis commented Jan 30, 2019

No description provided.

@lievendoclo

This comment has been minimized.

Copy link
Contributor

lievendoclo commented Jan 30, 2019

So you mean deprecating the annotation based parameters?

@cdupuis

This comment has been minimized.

Copy link
Contributor Author

cdupuis commented Jan 30, 2019

So you mean deprecating the annotation based parameters?

Not sure if I want to deprecate the actual decorators as they are being used actively by old style automation clients. But deprecate the paramsMaker property of CommandHandlerRegistration and GeneratorRegistration etc might be a start.

@johnsonr

This comment has been minimized.

Copy link
Contributor

johnsonr commented Jan 30, 2019

Yes. We should discourage the annotation style as the newer parameters model is more composable and less magical. It now enforces that parameter definitions match the relevant interface, which eliminates the last reason to use decorators.

@lievendoclo

This comment has been minimized.

Copy link
Contributor

lievendoclo commented Jan 30, 2019

Ok agreed, but I'd change the documentation to have the parameterDefinition variables typed, i.e.:

const helloWorldParametersDefinition: ParametersDefinition = {
        name: { description: "name",
            required: true,
            pattern: /.*/ },
        location: {},
    };

That way people have code completion in IDEs.

@cdupuis cdupuis closed this in f083857 Jan 31, 2019

atomist-bot added a commit that referenced this issue Jan 31, 2019

Changelog: #667 to changed, deprecated
[atomist:generated]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.