WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
It would be good to have a validator for JSON date timestamps (as resulting from (new Date()).toJSON() or JSON.stringify(new Date()), e.g. 2014-09-13T12:08:06.080Z)

It can be useful to validate arrays or objects resulting from the deserialization of a JSON string where some field represents a Date object.

A common use case is when you have to write a JSON rest API and you have to handle date fields coming from the request (and it's obviously good to validate these fields before using them on the server side).

I have written my own implementation for this and if it seems a good feature to integrate in the symfony core a can submit a pull request and write the related documentation.

PS: the validator can also be extended even further and support the entire ISO8601specification (eg. ISO8601DateValidator)

Issue 2:
At the moment, we have three constraints for validating date/time values:

Date accepts \DateTime instances and 'Y-m-d' strings

DateTime accepts \DateTime instances and 'Y-m-d H:i:s' strings

Time accepts \DateTime instances and 'H:i:s' strings

I think that's a bit confusing. Usually, a value should not be a \DateTime or a string, but either of them; if it is a string, it should usually match a specific pattern.

Therefore I propose to deprecate all three constraints. The \DateTime case can be solved with the Type constraint already:

/**
* @Assert\Type('\DateTime')
*/
private $createdAt;

The second case would be covered by a new Timestamp constraint which accepts a format as argument as supported by PHP:

/**
* @Assert\Timestamp('Y-m-d')
*/
private $createdAt;

/**
* @Assert\Timestamp('c')
*/
private $iso8601Date;

This would fix #11919 and replace #11821.
Issue 1:
[Enter steps to reproduce below:]

I opened a very large (591.0 MB (591,032,444 bytes)) JSON file.

Atom Version: 1.0.0

System: Ubuntu 15.04

Thrown From: Atom Core

Stack Trace

Uncaught RangeError: Invalid string length

At /usr/share/atom/resources/app.asar/node_modules/pathwatcher/lib/file.js:301

RangeError: Invalid string length
at Array.join (native)
at ReadStream.<anonymous> (/usr/share/atom/resources/app.asar/node_modules/pathwatcher/lib/file.js:301:43)
at emitNone (events.js:72:20)
at ReadStream.emit (events.js:163:7)
at _stream_readable.js:891:16
at process._tickCallback (node.js:357:13)

Commands

-8:52 editor:select-line (atom-text-editor.editor.is-focused)
-8:49.7.0 grammar-selector:show (atom-text-editor.editor.is-focused)
22x -8:04.1.0 pane:show-next-item (atom-text-editor.editor.is-focused)
2x -6:26 pane:show-previous-item (atom-text-editor.editor.is-focused)
-6:20.3.0 release-notes:show (atom-text-editor.editor.is-focused)
41x -0:16.5.0 core:close (atom-text-editor.editor.is-focused)

Config

{
"core": {},
"editor": {
"invisibles": {},
"fontSize": 10,
"tabLength": 4,
"showInvisibles": true
}
}

Installed Packages

# User
No installed packages

# Dev
No dev packages

Issue 2:
To reproduce:

dd if=/dev/zero of=largefile count=1 bs=1000M; if this does not reproduce play around with adjusting bs and count.

Open atom and try to open largefile.

Atom Version: 0.208.0

System: Ubuntu 15.04

Thrown From: Atom Core

Stack Trace

Uncaught RangeError: Invalid string length

At /usr/share/atom/resources/app.asar/node_modules/pathwatcher/lib/file.js:301

RangeError: Invalid string length
at Array.join (native)
at ReadStream.<anonymous> (/usr/share/atom/resources/app.asar/node_modules/pathwatcher/lib/file.js:301:43)
at emitNone (events.js:72:20)
at ReadStream.emit (events.js:163:7)
at _stream_readable.js:891:16
at process._tickCallback (node.js:357:13)

Commands

2x -3:24.1.0 release-notes:show (atom-text-editor.editor.is-focused)

Config

{
"core": {},
"editor": {
"invisibles": {},
"tabLength": 4
}
}

Installed Packages

# User
No installed packages

# Dev
No dev packages
Issue 1:
System information

macOS 10.12.5

installed from binary

Tensorflow v1.2.0-1751-g43a819e13 1.2.1

Python 3.6.1

Bazel 0.5.2-homebrew

Describe the problem

The custom model section of the "Getting Started With TensorFlow" guide doesn't define "eval_input_fn".

I ran across the error when I copied the code line by line and ran it on my machine. I fixed it by adding the following definition after "input_fn" is defined:

eval_input_fn = tf.contrib.learn.io.numpy_input_fn({"x":x_eval}, y_eval,
4, num_epochs = 1000);

Source code / logs

Code in Guide:

import numpy as np
import tensorflow as tf
# Declare list of features, we only have one real-valued feature
def model(features, labels, mode):
# Build a linear model and predict values
W = tf.get_variable("W", [1], dtype=tf.float64)
b = tf.get_variable("b", [1], dtype=tf.float64)
y = W*features['x'] + b
# Loss sub-graph
loss = tf.reduce_sum(tf.square(y - labels))
# Training sub-graph
global_step = tf.train.get_global_step()
optimizer = tf.train.GradientDescentOptimizer(0.01)
train = tf.group(optimizer.minimize(loss),
tf.assign_add(global_step, 1))
# ModelFnOps connects subgraphs we built to the
# appropriate functionality.
return tf.contrib.learn.ModelFnOps(
mode=mode, predictions=y,
loss=loss,
train_op=train)

estimator = tf.contrib.learn.Estimator(model_fn=model)
# define our data sets
x_train = np.array([1., 2., 3., 4.])
y_train = np.array([0., -1., -2., -3.])
x_eval = np.array([2., 5., 8., 1.])
y_eval = np.array([-1.01, -4.1, -7, 0.])
input_fn = tf.contrib.learn.io.numpy_input_fn({"x": x_train}, y_train, 4, num_epochs=1000)

# WHERE I ADDED THE DEFINITION

# train
estimator.fit(input_fn=input_fn, steps=1000)
# Here we evaluate how well our model did.
train_loss = estimator.evaluate(input_fn=input_fn)
eval_loss = estimator.evaluate(input_fn=eval_input_fn)
print("train loss: %r"% train_loss)
print("eval loss: %r"% eval_loss)

Error:

Traceback (most recent call last):
File "custom_model.py", line 37, in <module>
eval_loss = estimator.evaluate(input_fn=eval_input_fn);
NameError: name 'eval_input_fn' is not defined

Issue 2:
Hello,

I would like to submit that there is a programming bug on line 29 of the "custom model tutorial" within Getting Started with Tensorflow.

The line should read:

input_fn = tf.contrib.learn.io.numpy_input_fn({"x":x_train}, y_train, batch_size=4, num_epochs=1000)

​Best regards.

Jeff​
Issue 1:
因为采用dbproxy中间件，由dbproxy维持到mysql的connection。为了复用连接，不支持autocommit=0的方式开启事务，只能显式执行begin来开启事务。

但是sharding-jdbc没有实现begin或start transaction的MySQLParser。

Which version of Sharding-Jdbc do you using?（您使用的Sharding-Jdbc版本为？）

1.5.4.1

Expected behavior （您预期的结果是）

可以正常执行statement.executeUpdate("BEGIN");

Actual behavior （实际运行的结果是）

报异常com.dangdang.ddframe.rdb.sharding.parsing.parser.exception.SQLParsingUnsupportedException: Not supported token 'BEGIN'.

Steps to reproduce the behavior （可重现问题的操作步骤）

执行statement.executeUpdate("BEGIN");

Issue 2:
<bean:properties id="keyGeneratorProps">
<prop key="worker.id">?</prop>
</bean:properties>
<sharding:key-generator id="xxKeyGenerator" type="SNOWFLAKE" column="id" props-ref="keyGeneratorProps"/>
Issue 1:
I upgraded to version 0.18 today and I'm glad it can search all apps now, but when I try to open Windows terminal by typing "wt" it doesn't search out Windows terminal, but win10 search can do it, I wish powertoys could add support for aliases too!

Issue 2:
Summary of the new feature/enhancement

I'd love to be able to setup aliases where a user-meaningful short keyword can be mapped to an app, file, or URL (with parameters / arguments optional).

This would be similar in ways to "magic words" in the old SlickRun (https://bayden.com/SlickRun/1033/SlickRunHelp.aspx).

Typing the keyword would autocomplete and opening / selecting / invoking would launch the corresponding file / app / url.

Proposed technical implementation details (optional)

A "..." button could appear near search icon to launch a config screen or open a config file. There might also be a syntax or keyword to configure these aliases (like "setup" in SlickRun).
Issue 1:
In order to encourage the use of CommonJS and ES6 modules, when exporting a default export with no other exports module.exports will be set in addition to exports["default"].

I found this behavior to be counter-intuitive: it works… until you export more variables. Definitely unexpected :(

This could be fixed by switching by having module.exports = default before other exports, added via module.exports.doSomething = doSomething

Issue 2:
This sample code:

export default 1;
export const x = 2;

Generates:

"use strict";

Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = 1;
var x = 2;
exports.x = x;

Which is fine.

Now if we remove the named export:

export default 1;

Generates:

"use strict";

Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = 1;
module.exports = exports["default"];

The module.exports is overwritten by the default export.

This still works fine if importing the module via import statements (due to the interopRequireDefault helper), but it is rather confusing and error-prone if importing the CJS module via require() calls.

That is, sometimes the default export is returned directly by require('module'), other times you will need to access the require('module').default property, all depending on an arbitrary factor that may change anytime (adding/removing named exports), which causes a breaking change for all consumers.
Issue 1:
struct Foo<T>(T);
struct A;
struct B;

impl Foo<A> {
fn foo() {}
}
impl Foo<B> {
fn foo() {}
}

fn main() {}

produces duplicate definition error for foo:

test.rs:9:2: 9:13 error: duplicate definition of value `foo`
test.rs:9 fn foo() {}
^~~~~~~~~~~
test.rs:6:2: 6:13 note: first definition of value `foo` here
test.rs:6 fn foo() {}
^~~~~~~~~~~
error: aborting due to previous error

Since Foo<A> and Foo<B> are different types, it seems that their impls should not be interfering with each other.

Issue 2:
Currently there is no way to pass arbitrary compiler flags to rustdoc. This means that I can't use rustdoc to check cross compiled libraries. For example, checking i686-unknown-linux-gnu from x86_64-unknown-linux-gnu is impossible because I can't pass --target to rustdoc.

I've worked around this issue for now by disabling doctests in Servo, but that is not ideal.
Issue 1:
MnWE

import pandas as pd

the_int_column = pd.Series([1, 2, 3])
foobar = pd.DataFrame(columns=("ints",))
foobar.loc["First"] = [the_int_column.sum()]

print(foobar.dtypes)

the_float_column = pd.Series([1.0, 2.0, 3.0])
floatbar = pd.DataFrame(columns=("floats",))
floatbar.loc["First"] = [the_float_column.sum()]

print(floatbar.dtypes)

This yields

ints object
dtype: object
floats float64
dtype: object

Problem description

Assigning the sum of a Series of (vanilla Python) ints to a DataFrame leads to not specific enough type inference on the frame: it keeps the object type. Vanilla floats work fine, as the second example demonstrates.

This is an issue for some testing I'm doing, where I want to ensure a column of these sums contains only numeric data, and specifically integers.

Might be related to #20635.

Expected Output

Expected output:

ints int64
dtype: object
floats float64
dtype: object

Output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 3.6.4.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.22.0
pytest: 3.3.2
pip: 9.0.1
setuptools: 38.4.0
Cython: 0.27.3
numpy: 1.14.0
scipy: 1.0.0
pyarrow: None
xarray: None
IPython: 6.2.1
sphinx: 1.6.6
patsy: 0.5.0
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: 1.2.1
tables: 3.4.2
numexpr: 2.6.4
feather: None
matplotlib: 2.1.2
openpyxl: 2.4.10
xlrd: 1.1.0
xlwt: 1.3.0
xlsxwriter: 1.0.2
lxml: 4.1.1
bs4: 4.6.0
html5lib: 1.0.1
sqlalchemy: 1.2.1
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None

Issue 2:
When I run this code on 0.17.0 on Python 3.5.0

import pandas as pd
d = pd.DataFrame(data=[[2, 1]])
print(d.index)
print((d.
groupby(level=0).
apply(lambda d:
d.sort_values(0)
)
).index)

I get

Int64Index([0], dtype='int64')
MultiIndex(levels=[[0], [0]],
labels=[[0], [0]])

The index gets duplicated (and turned into a multiindex) as a result of the sort within the groupby.

Appears to be a bug to me.
Issue 1:
Bug Report

Current Behavior

babel-parser accepts the following but should not.

Input Code

[(a = 1)] = t;
[([b])] = t;

Expected behavior/code

It should error.

Issue 2:
Bug Report

Current Behavior

When assigning to a group that is an assignment the parser currently creates a Pattern node for the group. It should consider this a syntax error.

Input Code

(x = x) = x

Expected behavior/code

Syntax error.

Babel Configuration (.babelrc, package.json, cli command)

babelAst = babelParse(code, {
sourceType: goalMode === GOAL_MODULE ? 'module' : 'script',
strictMode: startInStrictMode ? true : false,
plugins: ['estree'],
}).program;

Environment

Babel version(s): v7.0.0 (regular)

Node/npm version: node 10

OS: linux

Monorepo only on sundays

How you are using Babel: code

Possible Solution

Whatever the mechanism for checking assignable is in Babel should do so properly across parens.

Additional context/Screenshots

Current:

{ type: 'Program',
body:
[ { type: 'ExpressionStatement',
expression:
{ type: 'AssignmentExpression',
left:
{ type: 'AssignmentPattern',
left: { type: 'Identifier', name: 'x' },
right: { type: 'Identifier', name: 'x' } },
operator: '=',
right: { type: 'Identifier', name: 'x' } } } ] }

Expected:

https://tc39.github.io/ecma262/#sec-assignment-operators-static-semantics-assignmenttargettype

This rule says that an assignment itself is not a valid assignment.

Note that assignments are right associative, so x = x = x is really x = (x = x), which is why this is still valid while still considering assignments invalid assignment targets.

https://tc39.github.io/ecma262/#sec-semantics-static-semantics-assignmenttargettype

This rule says that the AssignmentTargetType state of a (non-arrow) group is the AssignmentTargetType of its contents.

In other words; it's an invalid AssignmentTargetType and it should throw a syntax error.
Issue 1:
fn main() {
x.foo(1, 2,);
}

<anon>:2:16: 2:17 error: unexpected token: `)`
<anon>:2 x.foo(1, 2,);
^

http://is.gd/8OsLJv

Issue 2:
fn main() {
bar(baz,);
foo::bar(baz,);
foo.bar(baz,); //~ ERROR unexpected token: `)`
}

It works for functions and static methods—it should also work for instance methods.
Issue 1:
We are running kubernetes 1.2.4 on GKE. We observed that when we increased load on our system by 20% our outbound connections from our pods started to fail 80% of the time. After much diagnosing we found that our cluster was running with just one kube-dns pod. This pod was being hammered and resulted in failures to resolve DNS requests.

Our cluster started smaller (3x VM 8 core if i remember correctly) and is currently almost doubled in size/cores (10x VM 4 core).

Creating a new cluster in GKE of the same size gave us three kube-dns pods. My expectations would be that the amound of kube-dns pods would scale by load (using a HPA?) or that the pods would scale by cluster size (using deamonsets?). Not that the amound of kube-dns pods would be based on the initial cluster size when creating it in GKE.

Client Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.4", GitCommit:"3eed1e3be6848b877ff80a93da3785d9034d0a4f", GitTreeState:"clean"}
Server Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.4", GitCommit:"3eed1e3be6848b877ff80a93da3785d9034d0a4f", GitTreeState:"clean"}

NOTE: I do not know if this issue is superseded by the DNS changes discussed in #22823

Issue 2:
DNS SPOF, Autoscaling and GKE concerns - SPOF and upgrade path without downtime.

Investigate switching to deployments or HPA.

Fix addon manager upgrade path to allow rolling upgrades of DNS pods - SLO is 100% DNS service availability during rolling node upgrades and master upgrades.
Issue 1:
When I make use of the built-in withStyles HOC I don't get the automatic vendor prefixing despite the following pieces of documentation claiming otherwise:

When should I use inline-style vs withStyles()? it says that we can make use of withStyles in order to gain the benefit of vendor prefixing.

CSS-in-JS states that Material UI uses JSS at its core with the jss-preset-default which includes the jss-vendor-prefixer plugin.

I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Vendor prefixes should be generated for certain style rules like display: 'flex' or transform: 'translateX(100px)'

Current Behavior

No vendor prefixes are generated

Steps to Reproduce (for bugs)

https://codesandbox.io/s/985r6o933w

Inspect the element Test

Notice that no vendor prefixes are generated when looking at the class .ExampleContainer-root-1

Your Environment

Tech
Version

Material-UI
1.0.0 beta 21

React
16.1.1

browser
Chrome 62

Issue 2:
I am using the DatePicker to filter my results by date. However I need the ability to remove this filter setting if desired. The current DatePicker does not seem to have a way to do this - once a date is selected it is always there. Is there a way to do this?

Examples

Native <input type="date" /> on Chrome

Bootstrap DatePicker - has an optional clear button, also the input text can be simply deleted.
Issue 1:
Bug report

Bug summary

When doing scatter plot of nan values it crashes because the list of colors gets overwriten to an empty list by this line:

matplotlib/lib/mpl_toolkits/mplot3d/axes3d.py

Line 2317
in
c921e2e

xs, ys, zs, s, c = cbook.delete_masked_points(xs, ys, zs, s, c)

Code for reproduction

We hit this bug in mne-tools/mne-python#5676, but here is a MWE. Most probably this is a duplicated of #12641. In which case, this can be used as a test.

import matplotlib.pyplot as plt
import numpy as np

n_points = 4
xs = ys = zs = np.full(n_points, np.nan)
colors = list(np.full(2, 'k'))
plt.scatter(xs, ys, zs, c=colors)
plt.show()

Expected outcome

(As in matplotlib 2.2.2) we would expect an empty plot with no error

In [25]: matplotlib.__version__
Out[25]: '2.2.2'

In [26]: %paste
import matplotlib.pyplot as plt
import numpy as np

n_points = 4
xs = ys = zs = np.full(n_points, np.nan)
colors = list(np.full(2, 'k'))
plt.scatter(xs, ys, zs, c=colors)
plt.show()
## -- End pasted text --

In [27]:

Actual outcome

It breaks because cannot iterate over c

In [9]: matplotlib.__version__
Out[9]: '3.0.1'

In [10]: %paste
import matplotlib.pyplot as plt
import numpy as np

n_points = 4
xs = ys = zs = np.full(n_points, np.nan)
colors = list(np.full(2, 'k'))
plt.scatter(xs, ys, zs, c=colors)
plt.show()
## -- End pasted text --
Traceback (most recent call last):
File "<ipython-input-10-f59e87d45c38>", line 7, in <module>
plt.scatter(xs, ys, zs, c=colors)
File "/home/sik/miniconda3/envs/mne/lib/python3.6/site-packages/matplotlib/pyplot.py", line 2864, in scatter
is not None else {}), **kwargs)
File "/home/sik/miniconda3/envs/mne/lib/python3.6/site-packages/matplotlib/__init__.py", line 1805, in inner
return func(ax, *args, **kwargs)
File "/home/sik/miniconda3/envs/mne/lib/python3.6/site-packages/matplotlib/axes/_axes.py", line 4234, in scatter
.format(nc=n_elem, xs=x.size, ys=y.size)
ValueError: 'c' argument has 2 elements, which is not acceptable for use with 'x' with size 4, 'y' with size 4.

Issue 2:
This is a bit of a nitpick, but if you look at the latest mathtext example, many accents are too far to the left. It's actually a bit off in the 1.5.x docs, but perhaps not as noticeable with the other font.

For example, the acute accent on the 'a' is pretty clearly too far to the left, with the bottom starting at the start of the curve, when it really should start above the middle like the grave accent. The breve, dot, umlaut, tilde and arrow arrow also just slightly to the left (though pretty reasonable.) At this size, the macron seems okay, but at a larger font size, it seems slightly to the left as well.

At a guess, perhaps the location for the accents is tuned for regular text, and so is slightly to the left for math text, which is usually italic?
Issue 1:
Original ticket http://projects.scipy.org/numpy/ticket/863 on 2008-07-26 by @cournape, assigned to unknown.

@ 1.1.1rc2:

Ticket #658==7735==
==7735== Conditional jump or move depends on uninitialised value(s)
==7735== at 0x4639E7A: PyArray_UpdateFlags (arrayobject.c:5172)
==7735== by 0x4658FB3: PyArray_Newshape (multiarraymodule.c:758)
==7735== by 0x465A097: array_reshape (arraymethods.c:87)
==7735== by 0x80C9992: PyEval_EvalFrameEx (ceval.c:3573)
==7735== by 0x80CB0D6: PyEval_EvalCodeEx (ceval.c:2836)
==7735== by 0x80C92DD: PyEval_EvalFrameEx (ceval.c:3669)
==7735== by 0x80CB0D6: PyEval_EvalCodeEx (ceval.c:2836)
==7735== by 0x81133BA: function_call (funcobject.c:517)
==7735== by 0x805CB36: PyObject_Call (abstract.c:1861)
==7735== by 0x80C7CE3: PyEval_EvalFrameEx (ceval.c:3853)
==7735== by 0x80CB0D6: PyEval_EvalCodeEx (ceval.c:2836)
==7735== by 0x811342F: function_call (funcobject.c:517)

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/771 on 2008-05-07 by @alberts, assigned to unknown.

Valgrind warning when running test for ticket #1256:

==14758== Conditional jump or move depends on uninitialised value(s)
==14758== at 0x433E2D2: PyArray_UpdateFlags (arrayobject.c:5172)
==14758== by 0x43679C8: PyArray_Newshape (multiarraymodule.c:742)
==14758== by 0x436856E: array_reshape (arraymethods.c:87)
==14758== by 0x80CF775: PyEval_EvalFrameEx (ceval.c:3645)
==14758== by 0x80D0CA5: PyEval_EvalCodeEx (ceval.c:2908)
==14758== by 0x80CF002: PyEval_EvalFrameEx (ceval.c:3741)
==14758== by 0x80D0CA5: PyEval_EvalCodeEx (ceval.c:2908)
==14758== by 0x81235D5: function_call (funcobject.c:524)
==14758== by 0x805BE24: PyObject_Call (abstract.c:2490)
==14758== by 0x80CB503: PyEval_EvalFrameEx (ceval.c:3944)
==14758== by 0x80D0CA5: PyEval_EvalCodeEx (ceval.c:2908)
==14758== by 0x812350B: function_call (funcobject.c:524)
==14758== by 0x805BE24: PyObject_Call (abstract.c:2490)
==14758== by 0x8062C76: instancemethod_call (classobject.c:2558)
==14758== by 0x805BE24: PyObject_Call (abstract.c:2490)
==14758== by 0x80CBE34: PyEval_EvalFrameEx (ceval.c:3856)
==14758== by 0x80D0CA5: PyEval_EvalCodeEx (ceval.c:2908)
==14758== by 0x812350B: function_call (funcobject.c:524)
==14758== by 0x805BE24: PyObject_Call (abstract.c:2490)
==14758== by 0x8062C76: instancemethod_call (classobject.c:2558)

Found by the Python 2.6 buildbot.
Issue 1:
I have a simple file at /etc/foo.txt. The file contains the following:

#bar

I have the following ansible playbook task to uncomment the line above:

- name: test lineinfile
lineinfile: backup=yes state=present dest=/etc/foo.txt
regexp='^#bar'
line='bar'

When I first run ansible-playbook, the line gets uncommented and the /etc/foo.txt now contains the following:

bar

However, if I run ansible-playbook again, I get the following:

bar
bar

If I run it yet again, then the /etc/foo.txt file will look like this:

bar
bar
bar

I believe these duplications of lines are a bug.

Happens on ansible-playbook 1.3.3 and 1.2.2.

Issue 2:
Roles do not use their variable definitions when actvated via the role dependency mechanism.

ansible 1.4 -devel 214b0b0

Description

alpha role depends on beta role

Each role provides a unique value for a variable named 'port' /vars/main.yml

When beta role is executed (aka "active") via the role dependency mechanism, the role uses variable definitions from alpha role instead of its own definitions (roles/beta/vars/main.yml).

It has been noted that active roles use their variable definitions [unless higher precedent variables are passed via --extra-vars, or variable definitions in the base playbook]

"... within a role, the variables in roles/y/vars/main.yml are guaranteed to be applied to that specific role, just as if they were parameters explicitly passed to the role." ( https://groups.google.com/d/msg/ansible-project/0JIrNlnRXuI/tx1-inKYoUQJ )

Demonstration

https://github.com/briceburg/ansible-variable-scoping/tree/master/simple_vars