-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Integrate emilio #1944
Integrate emilio #1944
Conversation
Interesting, will look at this in more detail later |
@wohali I know you are busy with 3.0. Should I rebase against latest master or wait couple months (the release process is exhausting I am sure)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a bit more Windows love.
@@ -217,12 +217,25 @@ install_local_rebar() { | |||
fi | |||
} | |||
|
|||
install_local_emilio() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add all of this to configure.ps1
too. Are you up to the challenge? 🥊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a challenge indeed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the diff, feel free to add to this PR:
diff --git a/configure.ps1 b/configure.ps1
index c74fbcf41..21c079f67 100644
--- a/configure.ps1
+++ b/configure.ps1
@@ -205,6 +205,20 @@ if ((Get-Command "rebar.cmd" -ErrorAction SilentlyContinue) -eq $null)
$env:Path += ";$rootdir\bin"
}
+# check for emilio; if not found, get it and build it
+if ((Get-Command "emilio.cmd" -ErrorAction SilentlyContinue) -eq $null)
+{
+ Write-Verbose "==> emilio.cmd not found; bootstrapping..."
+ if (-Not (Test-Path "src\emilio"))
+ {
+ git clone --depth 1 https://github.com/wohali/emilio $rootdir\src\emilio
+ }
+ cmd /c "cd $rootdir\src\emilio && rebar compile escriptize"
+ cp $rootdir\src\emilio\emilio $rootdir\bin\emilio
+ cp $rootdir\src\emilio\bin\emilio.cmd $rootdir\bin\emilio.cmd
+ cmd /c "cd $rootdir\src\emilio && rebar clean"
+}
+
# only update dependencies, when we are not in a release tarball
if ( (Test-Path .git -PathType Container) -and (-not $SkipDeps) ) {
Write-Verbose "==> updating dependencies"
Note this depends on cloudant-labs/emilio#3 being merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much.
I'm digging this up again. Could we look at adding this into the CI flow without adding support for windows? Its going to be hard to do that. |
@garrensmith If you or @iilyak can freshen this PR to not have a conflict on |
Also, if you can move the source branch into the |
Awesome thanks that will be great
…________________________________
From: Joan Touzet <[email protected]>
Sent: Thursday, April 2, 2020 6:25:51 PM
To: apache/couchdb <[email protected]>
Cc: garren smith <[email protected]>; Mention <[email protected]>
Subject: Re: [apache/couchdb] Integrate emilio (#1944)
Also, if you can move the source branch into the apache/couchdb repo, I can PR against it with the Windows changes. Otherwise, I'll just post a diff here that you can apply yourself.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1944 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AABL2AWI62VREKF2UT6BBPLRKS4A7ANCNFSM4G2LMMSA>.
|
cwd=`pwd` | ||
cd ${rootdir}/src/emilio && ${REBAR} compile escriptize; cd ${cwd} | ||
mv ${rootdir}/src/emilio/emilio ${rootdir}/bin/emilio | ||
chmod +x ${rootdir}/bin/emilio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also do a cd ${rootdir}/src/emilio && ${REBAR} clean
at this point, like we do on L216 for rebar
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pre-approved, once requested changes / linked PR are applied.
FYI: As emilio is an optional testing component, and we don't ship the code, it does not need to live in an Apache repo.
@@ -217,12 +217,25 @@ install_local_rebar() { | |||
fi | |||
} | |||
|
|||
install_local_emilio() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the diff, feel free to add to this PR:
diff --git a/configure.ps1 b/configure.ps1
index c74fbcf41..21c079f67 100644
--- a/configure.ps1
+++ b/configure.ps1
@@ -205,6 +205,20 @@ if ((Get-Command "rebar.cmd" -ErrorAction SilentlyContinue) -eq $null)
$env:Path += ";$rootdir\bin"
}
+# check for emilio; if not found, get it and build it
+if ((Get-Command "emilio.cmd" -ErrorAction SilentlyContinue) -eq $null)
+{
+ Write-Verbose "==> emilio.cmd not found; bootstrapping..."
+ if (-Not (Test-Path "src\emilio"))
+ {
+ git clone --depth 1 https://github.com/wohali/emilio $rootdir\src\emilio
+ }
+ cmd /c "cd $rootdir\src\emilio && rebar compile escriptize"
+ cp $rootdir\src\emilio\emilio $rootdir\bin\emilio
+ cp $rootdir\src\emilio\bin\emilio.cmd $rootdir\bin\emilio.cmd
+ cmd /c "cd $rootdir\src\emilio && rebar clean"
+}
+
# only update dependencies, when we are not in a release tarball
if ( (Test-Path .git -PathType Container) -and (-not $SkipDeps) ) {
Write-Verbose "==> updating dependencies"
Note this depends on cloudant-labs/emilio#3 being merged.
@wohali cloudant-labs/emilio#3 is merged. |
9cfc5e7
to
fbf4710
Compare
CI is failing with unrelated issue 😢
|
I also can't build your branch, either in the CI environment or locally. Here's what I'm doing:
This fails in the same way as Jenkins is failing. I don't get the same failure from Also you still need to apply the diff I provided in comment. Perhaps close this PR and reopen it by doing the branch off of |
Possibly of interest: https://medium.com/@elbrujohalcon/are-formatters-better-than-linters-cbab91189be3 |
97a7c7a
to
7a11315
Compare
7a11315
to
522627e
Compare
@wohali: Thank you for your help with Windows part. |
Overview
Add
emilio
erlang linter to ensure unified style.Testing recommendations
./configure
(make surebin/emilio
script is created)./configure
again and make sure it doesn't try to installemilio
againignore
section ofemilio.config
)make emilio
and make sure that:bin/emilio -c emilio.config src | bin/warnings_in_scope -s 0
to see warnings fromemilio
bin/emilio -c emilio.config src
and make sure dependencies mentioned inignore
section ofemilio.config
are ignoredRelated Issues or Pull Requests
Checklist