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

Replicated copyright in generated files #2199

Closed
iposva-google opened this issue Mar 16, 2012 · 8 comments
Closed

Replicated copyright in generated files #2199

iposva-google opened this issue Mar 16, 2012 · 8 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-not-planned Closed as we don't intend to take action on the reported issue library-html

Comments

@iposva-google
Copy link
Contributor

This copyright header is replicated many times in the generated dom.dart file. Not sure if the same issue exists in the dart:html library.

// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// WARNING: Do not edit - generated code.

@rakudrama
Copy link
Member

The dart and dom library files are generated from a #library file by substituting sourced files for the #source lines that name them. The replicated copyright is a consequence of this. There are 2012 and 2011 versions of the notice reflecting that not all contributing files have been edited recently.

The #sourced files are either real source files in our tree, or generated from template files in our tree. The real sources and templates in our tree should have a copyright notice.
We used to check in the 3000 generated files, and we might put (some of) them in a JAR for the editor, which would indicate that the individual generated files should have a copyright notice.

Option #­1: Consider this 'by design'. We did not lose a copyright notice, even if there are many different kinds of copyright notice.

Option #­2: Add a comment for each #sourced file with the name of the file:

// ---- src/Foo.dart
// Copyright (c) 2011 ...
interface Foo ...
// ---- generated/src/interfaces/HTMLElement.dart
// Copyright (c) 2012 ...
interface HTMLElement ...

This would allow the combined file to be a bit more like an archive and allow the files to be extracted.
It would help a bit with debugging to see where bad code came from.
The cost is another 1000 lines of comments.

Option #­3: Extract all copyright notices and list unique ones at the top of the generated file:

// Copyright (c) 2011 ...
// Copyright (c) 2012 ...
interface Foo ...
interface HTMLElement ...

This is more effort to implement.
It would give a modest reduction in (comment) bytes parsed during compilation.

I don't think we should mix #­2 and #­3 since that would allow the extraction of a file without the correct (or any) copyright notice, unless we replace the copyright with a one-line 'pointer' to the version at the top.

Perhaps you could state why the duplicated copyrights are a problem (legal, technical, aesthetic) and the correct solution will follow from that.

Whatever solution we pick, we will probably have to rewrite it if the #library-#source system changes much.

@vsmenon
Copy link
Member

vsmenon commented Apr 13, 2012

Removed Area-UI label.
Added Area-DOM label.

@vsmenon
Copy link
Member

vsmenon commented Jul 12, 2012

We'll revisit once we break this file up.


Added this to the Later milestone.

@iposva-google
Copy link
Contributor Author

Removed Area-DOM label.
Added Area-HTML label.

@kevmoo
Copy link
Member

kevmoo commented Apr 7, 2014

Removed Area-HTML label.
Added Area-Library, Library-Html labels.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@efortuna
Copy link
Contributor

efortuna commented Aug 6, 2014

We've broken dart:html into sublibraries, but in the meanwhile, we've not heard why the duplicated copyrights are a problem. Closing as NotPlanned.


Added NotPlanned label.

@iposva-google iposva-google added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-html closed-not-planned Closed as we don't intend to take action on the reported issue labels Aug 6, 2014
dart-bot pushed a commit that referenced this issue Oct 29, 2019
Includes the following commits:
80ac76400ff58fde3c5a335d860d196c3febe837 Warn about authors field in pubspec.yaml
6b6e02fcdd8094ccbba919b2fdc74947b1cebb71 Warn about old flutter plugin registration format (#2233)
8308acbc48ebd4da4ab7f45169af8dee4df18e79 Language versioning
b18d4f6a5d035f4f72ef187e9cdb133d18848c2d update doc
408bdd58ab01689fd82cc036b4142f7b592b4ba0 Added utility for faster local testing (#2235)
055fc19d2e06e819dbd47b3b56909c47bd893f66 Upgraded package:yaml to 2.2.0 (#2237)
0f3baf7abb13702f7fb1ff3709c584065df1435c Remove unused Map `availableVersions`
cfa9dc760b6b601f9473e65d15f15b60a319336d Fix to show proper error message when git is not installed (#2209)
d99b0d58f4059d7bb4ac4616fd3d54ec00a2b5d4 Rephrase warnings for missing deps (#2203)
76b8c30395b37f96d3db3e842344cc842bdd7c24 Don't mention 'transformed dependencies'. (#2199)
4bd65e0f54e6e4540f03467b0272a5666e8d54ba return the hashCode of the description (#2198)
92b52682e8fc6eed9ef2e77ed890647f75570165 Test more pre-release behavior. (#2175)
066ac118d406500f672339e25f0154af9321deac update to latest pkg:analyzer (#2172)
289804a5d2c9746b4e86c271c2abcfe17417e20f Minor typo fixed (#2166)

Change-Id: I3922bcaacb5399853a291b92d7192d21f719d224
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123404
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
copybara-service bot pushed a commit that referenced this issue Sep 8, 2023
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (https://github.com/dart-lang/dartdoc/compare/a32ba3a..adc76e6):
  adc76e6d  2023-09-06  Parker Lougheed  Take advantage of a few Dart 3 features (#3491)

leak_tracker (https://github.com/dart-lang/leak_tracker/compare/098bafc..4616c8b):
  4616c8b  2023-09-05  Polina Cherkasova  Note about OverlayEntry. (#142)
  fd7d70f  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#141)
  c6c1004  2023-09-01  Polina Cherkasova  - (#139)
  0298e20  2023-08-31  Polina Cherkasova  Add a test specific rule. (#138)
  ea17fa4  2023-08-29  Polina Cherkasova  Increase version of leak_tracker_flutter_testing (#136)
  8f830d6  2023-08-29  Polina Cherkasova  Update pubspec.yaml (#135)
  8a54575  2023-08-29  Polina Cherkasova  Enable connection to vm service for flutter testing and define matcher for reporting for memory
allocations. (#128)
  88a19a7  2023-08-28  Polina Cherkasova  - (#133)
  2070856  2023-08-24  Polina Cherkasova  Add instruction to start tracking instances of ChangeNotifier earlier. (#130)
  eb6113a  2023-08-23  Polina Cherkasova  Measure how memory is consumed by a test. (#114)
  72264f7  2023-08-22  Polina Cherkasova  Fix misspelling. (#131)
  87c9e9e  2023-08-16  Polina Cherkasova  Add debugging construcstors to LeakTrackingTestConfig, per leak type. (#129)
  b29547a  2023-08-15  Polina Cherkasova  Create visibility for roadmap for leak_tracker. (#124)
  23b15b6  2023-08-15  Polina Cherkasova  Fix issue of using wrong settings for a phase. (#122)
  713f646  2023-08-11  Polina Cherkasova  Enable global configuration for leak tracking. (#121)
  19b01cf  2023-08-10  Polina Cherkasova  Create package leak_tracker_flutter_testing. (#119)
  02d0b2f  2023-08-07  Polina Cherkasova  Stop failing if object is disposed twice. (#117)
  2026379  2023-08-04  Polina Cherkasova  Remove not-published versions and increase leak_tracker version. (#116)
  9bb71c6  2023-08-04  Polina Cherkasova  Stop requiring registration of disposed objects. (#113)
  8939456  2023-08-04  Polina Cherkasova  Refactor dispatcher. (#115)
  6f54f5a  2023-08-01  Polina Cherkasova  Start vm service when needed. (#112)
  b045c5e  2023-08-01  Polina Cherkasova  Reorganize leak tracker for better performance. (#106)
  127b83c  2023-07-31  Polina Cherkasova  Update TROUBLESHOOT.md (#108)
  6dabd33  2023-07-31  Polina Cherkasova  Simplify and clarify instructions to fix leaks. (#107)
  c53db68  2023-07-25  Polina Cherkasova  Improve code structure. (#103)
  10cce1a  2023-07-24  Polina Cherkasova  Rename `gcCountBuffer` to `numberOfGcCycles`. (#101)
  3a061a4  2023-07-21  Polina Cherkasova  Improve doc comments. (#100)
  6e3f57c  2023-07-21  Polina Cherkasova  Fix and test cover case of customized `gcCountBuffer` (#99)
  2152aab  2023-07-21  Polina Cherkasova  Add details about hidden leaks. (#97)

lints (https://github.com/dart-lang/lints/compare/da44af3..8d5f750):
  8d5f750  2023-09-06  Devon Carew  move the list of lint rules from the readme to a separate rules.md file (#145)

native (https://github.com/dart-lang/native/compare/a2dfedc..387f894):
  387f894  2023-09-06  Gabriel Terwesten  [native_toolchain_c] Default handling for PIC/PIE compiler flags (#121)
  0a4e5f8  2023-09-06  Gabriel Terwesten  Add support for defines to `CBuilder` (#120)

webdev (https://github.com/dart-lang/webdev/compare/fc876cb..9487a45):
  9487a459  2023-09-05  Jacob Bang  Update README.md to use `dart pub` instead of `pub` (#2195)
  07367779  2023-08-31  Elliott Brooks  Pass the package config directly to the load strategy instead of depending on an app entrypoint
(#2203)
  0044d753  2023-08-24  Jonas Termansen  Fix conflicting webdev smoke package names. (#2202)
  6183f270  2023-08-23  Elliott Brooks  Allow client to specify a way to convert an absolute path into a g3-relative path (#2200)
  b244b899  2023-08-22  Elliott Brooks  Allow client to specify how to find the package config  (#2199)

Change-Id: Ic00adc68ec01cd0cc6e27be665436de5095d8d07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324801
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-not-planned Closed as we don't intend to take action on the reported issue library-html
Projects
None yet
Development

No branches or pull requests

6 participants