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

Introduce `--codegen` argument so targets can be specified explicitly #3324

Merged
merged 6 commits into from Apr 27, 2018

Conversation

Projects
None yet
5 participants
@garyb
Copy link
Member

garyb commented Apr 26, 2018

Resolves #3196, closes #3258

Default is js, using sourcemaps implies js and the separate option for source maps is gone now.

Thanks to @gabejohnson for doing the first part of this!

@garyb

This comment has been minimized.

Copy link
Member

garyb commented Apr 27, 2018

Any thoughts/comments about this @kRITZCREEK @LiamGoodacre @hdgarrood?

@hdgarrood

This comment has been minimized.

Copy link
Contributor

hdgarrood commented Apr 27, 2018

👍 I like this a lot!

@kRITZCREEK
Copy link
Member

kRITZCREEK left a comment

Just a minor question

targetParser :: Opts.ReadM [P.CodegenTarget]
targetParser =
Opts.str >>= \s ->
for (T.split (== ',') s)

This comment has been minimized.

@kRITZCREEK

kRITZCREEK Apr 27, 2018

Member

Do we want to be a bit more lenient here and strip the text after splitting?

This comment has been minimized.

@garyb

garyb Apr 27, 2018

Member

I'm not sure how you'd get spaces into that value anyway? Since --codegen js, corefn wouldn't parse as one thing.

This comment has been minimized.

@garyb

garyb Apr 27, 2018

Member

Oh... quotes maybe?

This comment has been minimized.

@kRITZCREEK

kRITZCREEK Apr 27, 2018

Member

Yeah, that's what I'd expect to happen

@LiamGoodacre

This comment has been minimized.

Copy link
Member

LiamGoodacre commented Apr 27, 2018

Awesome. No comments other than what @kRITZCREEK raised. 💯

@@ -154,6 +154,8 @@ targetParser =
$ maybe (Opts.readerError targetsMessage) pure
. flip M.lookup targets
. T.unpack
. T.takeWhile (/= ' ')

This comment has been minimized.

This comment has been minimized.

@garyb

garyb Apr 27, 2018

Member

Thanks, couldn't find that when I looked through the docs before!

@garyb garyb force-pushed the garyb:customisable-codegen branch from 99547dd to c40b016 Apr 27, 2018

@garyb garyb merged commit 91e77b7 into purescript:master Apr 27, 2018

1 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@garyb garyb deleted the garyb:customisable-codegen branch Apr 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment